diff --git a/Core/Database.lua b/Core/Database.lua
index ea44616..0bdebcf 100644
--- a/Core/Database.lua
+++ b/Core/Database.lua
@@ -46,12 +46,16 @@ function DB:Initialize()
hideFooter = false,
bgTransparency = 0.15,
showTrackedItems = true,
+ showTooltipCounts = true,
trackedItems = {},
},
}
end
-- Ensure new settings exist for existing installations
+ if Guda_CharDB.settings.showTooltipCounts == nil then
+ Guda_CharDB.settings.showTooltipCounts = true
+ end
if Guda_CharDB.settings.bgTransparency == nil then
if Guda_CharDB.settings.frameOpacity ~= nil then
Guda_CharDB.settings.bgTransparency = 1.0 - Guda_CharDB.settings.frameOpacity
diff --git a/Core/Tooltip.lua b/Core/Tooltip.lua
index 0a4a590..cad480d 100644
--- a/Core/Tooltip.lua
+++ b/Core/Tooltip.lua
@@ -165,6 +165,11 @@ local function GetClassColor(classToken)
end
function Tooltip:AddInventoryInfo(tooltip, link)
+-- Check if the setting is enabled
+ if not addon.Modules.DB:GetSetting("showTooltipCounts") then
+ return
+ end
+
-- Check if database is properly initialized and has the expected structure
if not Guda_DB or type(Guda_DB) ~= "table" then
return
diff --git a/Localization.lua b/Localization.lua
index ef09536..d169902 100644
--- a/Localization.lua
+++ b/Localization.lua
@@ -8,3 +8,14 @@ BINDING_NAME_GUDA_USE_QUEST_ITEM_1 = "Quest Bar 1"
BINDING_NAME_GUDA_USE_QUEST_ITEM_2 = "Quest Bar 2"
-- Additional localization strings can be added here
+L_SHOW_TOOLTIP_COUNTS = "Tooltip Extension"
+L_SHOW_TOOLTIP_COUNTS_TT = "Show how many of this item you have across all your characters in the item tooltip."
+
+L_LOCK_BAGS_TT = "Lock the bag frames in place so they cannot be moved by dragging."
+L_HIDE_BORDERS_TT = "Hide the thick borders around the bag and bank frames for a cleaner look."
+L_QUALITY_BORDER_EQ_TT = "Show a color-coded border around equipped items based on their quality (Common, Rare, Epic, etc.)."
+L_QUALITY_BORDER_OTHER_TT = "Show a color-coded border around non-equipped items in your bags and bank based on their quality."
+L_SHOW_SEARCH_BAR_TT = "Show a search bar at the top of your bags to quickly find items."
+L_SHOW_QUEST_BAR_TT = "Show a bar for quickly accessing quest-related items."
+L_HOVER_BAGLINE_TT = "Minimizes the bag container to show only the main bag and keyring. Hover over the main bag to view the other bags."
+L_HIDE_FOOTER_TT = "Hide the bottom section of the bag frame containing money and bag slots."
diff --git a/UI/SettingsPopup.lua b/UI/SettingsPopup.lua
index f18105c..abb668d 100644
--- a/UI/SettingsPopup.lua
+++ b/UI/SettingsPopup.lua
@@ -120,6 +120,13 @@ function Guda_SettingsPopup_OnShow(self)
local showSearchBarCheckbox = getglobal("Guda_SettingsPopup_ShowSearchBarCheckbox")
local showQuestBarCheckbox = getglobal("Guda_SettingsPopup_ShowQuestBarCheckbox")
local hoverBaglineCheckbox = getglobal("Guda_SettingsPopup_HoverBaglineCheckbox")
+ local hideFooterCheckbox = getglobal("Guda_SettingsPopup_HideFooterCheckbox")
+ local showTooltipCountsCheckbox = getglobal("Guda_SettingsPopup_ShowTooltipCountsCheckbox")
+
+ local showTooltipCounts = Guda.Modules.DB:GetSetting("showTooltipCounts")
+ if showTooltipCounts == nil then
+ showTooltipCounts = true
+ end
if bagSlider then
bagSlider:SetValue(bagColumns)
@@ -173,6 +180,10 @@ function Guda_SettingsPopup_OnShow(self)
hoverBaglineCheckbox:SetChecked(hoverBagline and 1 or 0)
end
+ if showTooltipCountsCheckbox then
+ showTooltipCountsCheckbox:SetChecked(showTooltipCounts and 1 or 0)
+ end
+
-- Update display (might be too tall for current frame size)
local frame = getglobal("Guda_SettingsPopup")
@@ -486,6 +497,9 @@ function Guda_SettingsPopup_LockBagsCheckbox_OnLoad(self)
end
end
+ -- Tooltip
+ self.tooltipText = L_LOCK_BAGS_TT
+
local isLocked = false
if Guda and Guda.Modules and Guda.Modules.DB then
isLocked = Guda.Modules.DB:GetSetting("lockBags")
@@ -525,6 +539,9 @@ function Guda_SettingsPopup_HideBordersCheckbox_OnLoad(self)
end
end
+ -- Tooltip
+ self.tooltipText = L_HIDE_BORDERS_TT
+
local hideBorders = false
if Guda and Guda.Modules and Guda.Modules.DB then
hideBorders = Guda.Modules.DB:GetSetting("hideBorders")
@@ -583,6 +600,9 @@ function Guda_SettingsPopup_QualityBorderEquipmentCheckbox_OnLoad(self)
end
end
+ -- Tooltip
+ self.tooltipText = L_QUALITY_BORDER_EQ_TT
+
local showBorders = true
if Guda and Guda.Modules and Guda.Modules.DB then
showBorders = Guda.Modules.DB:GetSetting("showQualityBorderEquipment")
@@ -628,6 +648,9 @@ function Guda_SettingsPopup_QualityBorderOtherCheckbox_OnLoad(self)
end
end
+ -- Tooltip
+ self.tooltipText = L_QUALITY_BORDER_OTHER_TT
+
local showBorders = true
if Guda and Guda.Modules and Guda.Modules.DB then
showBorders = Guda.Modules.DB:GetSetting("showQualityBorderOther")
@@ -673,6 +696,9 @@ function Guda_SettingsPopup_ShowSearchBarCheckbox_OnLoad(self)
end
end
+ -- Tooltip
+ self.tooltipText = L_SHOW_SEARCH_BAR_TT
+
local showSearchBar = true
if Guda and Guda.Modules and Guda.Modules.DB then
showSearchBar = Guda.Modules.DB:GetSetting("showSearchBar")
@@ -727,6 +753,9 @@ function Guda_SettingsPopup_ShowQuestBarCheckbox_OnLoad(self)
end
end
+ -- Tooltip
+ self.tooltipText = L_SHOW_QUEST_BAR_TT
+
local showQuestBar = true
if Guda and Guda.Modules and Guda.Modules.DB then
showQuestBar = Guda.Modules.DB:GetSetting("showQuestBar")
@@ -766,6 +795,9 @@ function Guda_SettingsPopup_HoverBaglineCheckbox_OnLoad(self)
end
end
+ -- Tooltip
+ self.tooltipText = L_HOVER_BAGLINE_TT
+
local hoverBagline = false
if Guda and Guda.Modules and Guda.Modules.DB then
hoverBagline = Guda.Modules.DB:GetSetting("hoverBagline")
@@ -806,6 +838,9 @@ function Guda_SettingsPopup_HideFooterCheckbox_OnLoad(self)
end
end
+ -- Tooltip
+ self.tooltipText = L_HIDE_FOOTER_TT
+
local hideFooter = false
if Guda and Guda.Modules and Guda.Modules.DB then
hideFooter = Guda.Modules.DB:GetSetting("hideFooter")
@@ -845,6 +880,43 @@ function Guda_SettingsPopup_HideFooterCheckbox_OnClick(self)
end
end
+-- Show Tooltip Counts Checkbox OnLoad
+function Guda_SettingsPopup_ShowTooltipCountsCheckbox_OnLoad(self)
+ local text = getglobal(self:GetName().."Text")
+ if text then
+ text:SetText(L_SHOW_TOOLTIP_COUNTS or "Show Item Counts in Tooltip")
+
+ -- Increase font size
+ local font, _, flags = text:GetFont()
+ if font then
+ text:SetFont(font, 13, flags)
+ end
+ end
+
+ -- Tooltip
+ self.tooltipText = L_SHOW_TOOLTIP_COUNTS_TT or "Show how many of this item you have across all your characters in the item tooltip."
+
+ local showTooltipCounts = true
+ if Guda and Guda.Modules and Guda.Modules.DB then
+ showTooltipCounts = Guda.Modules.DB:GetSetting("showTooltipCounts")
+ if showTooltipCounts == nil then
+ showTooltipCounts = true
+ end
+ end
+
+ self:SetChecked(showTooltipCounts and 1 or 0)
+end
+
+-- Show Tooltip Counts Checkbox OnClick
+function Guda_SettingsPopup_ShowTooltipCountsCheckbox_OnClick(self)
+ local isChecked = self:GetChecked() == 1
+
+ -- Save setting
+ if Guda and Guda.Modules and Guda.Modules.DB then
+ Guda.Modules.DB:SetSetting("showTooltipCounts", isChecked)
+ end
+end
+
-- Initialize
function SettingsPopup:Initialize()
Guda:Debug("Settings popup initialized")
diff --git a/UI/SettingsPopup.xml b/UI/SettingsPopup.xml
index a1563ee..d75bd29 100644
--- a/UI/SettingsPopup.xml
+++ b/UI/SettingsPopup.xml
@@ -3,7 +3,7 @@
-
+
@@ -95,7 +95,7 @@
-
+
@@ -117,7 +117,7 @@
-
+
@@ -139,7 +139,7 @@
-
+
@@ -161,7 +161,7 @@
-
+
@@ -183,7 +183,7 @@
-
+
@@ -205,7 +205,7 @@
-
+
@@ -229,7 +229,7 @@
-
+
@@ -248,7 +248,7 @@
-
+
@@ -265,9 +265,9 @@
-
+
-
+
@@ -284,9 +284,9 @@
-
+
-
+
@@ -303,9 +303,9 @@
-
+
-
+
@@ -324,7 +324,7 @@
-
+
@@ -341,7 +341,7 @@
-
+
@@ -362,7 +362,7 @@
-
+
@@ -375,6 +375,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Guda_SettingsPopup_ShowTooltipCountsCheckbox_OnLoad(this)
+
+
+ Guda_SettingsPopup_ShowTooltipCountsCheckbox_OnClick(this)
+
+
+
@@ -384,7 +403,7 @@
-
+