output notifications setup

esorochinskiy [06-01-22 - 05:55]
output notifications setup
Filename
UI.lua
WellEater.lua
lang/en.lua
lang/ru.lua
diff --git a/UI.lua b/UI.lua
index 45fba76..f44f9e1 100644
--- a/UI.lua
+++ b/UI.lua
@@ -85,10 +85,6 @@ function WellEater:initSettingsMenu()
         noAlert = true,
     }, "general", "updateTime")

-    MakeControlEntry({
-        type = "header",
-        name = L.generalSetupHeader,
-    })

     MakeControlEntry({
         type = "header",
@@ -103,6 +99,17 @@ function WellEater:initSettingsMenu()
         }, "general", i)
     end

+    MakeControlEntry({
+        type = "header",
+        name = L.outputSetupHeader,
+    })
+
+    MakeControlEntry({
+        type = "checkbox",
+        name = L.outputOnScreen,
+        tooltip = L.outputSetupHeader_TT,
+    }, "general", "notifyToScreen")
+
     self.optionsData = optionsTable
     -- local myLAMAddonPanel =
     LAM:RegisterAddonPanel(self:getAddonName() .. "_Settings_Panel", self.panelData)
diff --git a/WellEater.lua b/WellEater.lua
index a8d8310..a286d81 100644
--- a/WellEater.lua
+++ b/WellEater.lua
@@ -12,6 +12,7 @@ NAMESPACE.settingsDefaults = {
     [ITEM_QUALITY_ARCANE] = true,
     [ITEM_QUALITY_ARTIFACT] = false,
     [ITEM_QUALITY_LEGENDARY] = false,
+    notifyToScreen = true,
 }

 function WellEater:getAddonName()
@@ -154,10 +155,12 @@ local function processAutoEat()
                         local formattedName = zo_strformat(locale.youEat, GetItemLinkName(itemLink)) -- no control codes

                         if formattedName and abilityDescription then
-                            --d("Name = " .. formattedName)
-                            --d("Description = " .. abilityDescription)
-                            WellEaterIndicator:SetHidden(false)
-                            WellEaterIndicatorLabel:SetText(formattedName)
+                            local toScreen = locSettings.notifyToScreen
+                            if toScreen then
+                                WellEaterIndicator:SetHidden(false)
+                                WellEaterIndicatorLabel:SetText(formattedName)
+                            end
+                            d(WellEater.AddonName .. formattedName)
                         end

                         tryToUseItem(bagId, slotId)
diff --git a/lang/en.lua b/lang/en.lua
index 7c40b70..ba191f4 100644
--- a/lang/en.lua
+++ b/lang/en.lua
@@ -1,8 +1,7 @@
 WellEater = WellEater or {}
 local L = {
-    generalSetupHeader = "Food search criteria to scan your inventory",
     generalSetupDescription = "Auto eat your preferred meals provided by your inventory after food or drink buff expiration",
-    foodQualityHeader = "Food Quality",
+    foodQualityHeader = "Quality Of Food to search",
     foods = {
         [ITEM_QUALITY_MAGIC] = "Normal (green)",
         [ITEM_QUALITY_ARCANE] = "Excellent (blue)",
@@ -15,6 +14,9 @@ local L = {
             "you can run out of food for a long time in critical situation",

     youEat = "You have eaten <<1>>",
+    outputSetupHeader = "Meal Eaten Notification Output",
+    outputOnScreen = "On screen",
+    outputSetupHeader_TT = "When on the notification about the meal eaten is written to the screen not only to the debug log",
 }

 function WellEater:getLocale()
diff --git a/lang/ru.lua b/lang/ru.lua
index ad9965f..9d94f93 100644
--- a/lang/ru.lua
+++ b/lang/ru.lua
@@ -1,8 +1,7 @@
 WellEater = WellEater or {}
 local L = {
-    generalSetupHeader = "Критерии поиска еды в инвентаре",
     generalSetupDescription = "После истечения времени эффектов, которые дает еда, позволяет автоматически съесть найденное в инвентаре блюдо",
-    foodQualityHeader = "Качество еды",
+    foodQualityHeader = "Качество искомой еды",
     foods = {
         [ITEM_QUALITY_MAGIC] = "Хорошее (зеленое)",
         [ITEM_QUALITY_ARCANE] = "Превосходное (синее)",
@@ -16,6 +15,11 @@ local L = {
     " в критической ситуации",

     youEat = "Вы съели: <<1>>",
+    outputSetupHeader = "Вывод сообщения о съеденном блюде",
+    outputOnScreen = "На экран",
+    outputSetupHeader_TT = "При включенной настройке сообщение о съеденном блюде будет выведено на экран, а не только" ..
+            " в лог отладки",
+
 }

 function WellEater:getLocale()