fix: keyring hover

This commit is contained in:
Salikh Gurgenidze
2025-12-29 03:21:47 +04:00
parent 11bcb266a6
commit 4004383d41
3 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: Guda
## Notes: All-in-one bag and bank addon for Turtle WoW
## Author: Vati
## Version: 1.5.1
## Version: 1.5.2
## SavedVariables: Guda_DB
## SavedVariablesPerCharacter: Guda_CharDB
+14
View File
@@ -2002,6 +2002,18 @@ function Guda_BagSlot_OnEnter(button, bagID)
else
GameTooltip:AddLine("(Right-Click to hide)", 0.5, 0.8, 0.5)
end
Guda_BagFrame_HighlightBagSlots(0)
elseif bagID == -2 then
-- Keyring tooltip
GameTooltip:SetText("Keyring", 1.0, 1.0, 1.0)
local numSlots = GetContainerNumSlots(-2) or 0
GameTooltip:AddLine(string.format("%d Slots", numSlots), 0.8, 0.8, 0.8)
if hiddenBags[bagID] then
GameTooltip:AddLine("(Hidden - Right-Click to show)", 0.8, 0.5, 0.5)
else
GameTooltip:AddLine("(Right-Click to hide)", 0.5, 0.8, 0.5)
end
Guda_BagFrame_HighlightBagSlots(-2)
else
-- Bag slot tooltip
local invSlot = ContainerIDToInventoryID(bagID)
@@ -2015,6 +2027,7 @@ function Guda_BagSlot_OnEnter(button, bagID)
else
GameTooltip:AddLine("(Right-Click to hide)", 0.5, 0.8, 0.5)
end
Guda_BagFrame_HighlightBagSlots(bagID)
else
-- Empty slot
GameTooltip:SetText(string.format("Bag %d", bagID), 1.0, 1.0, 1.0)
@@ -2024,6 +2037,7 @@ function Guda_BagSlot_OnEnter(button, bagID)
else
GameTooltip:AddLine("(Right-Click to hide)", 0.5, 0.8, 0.5)
end
Guda_BagFrame_HighlightBagSlots(bagID)
end
end
-12
View File
@@ -338,7 +338,6 @@
</OnClick>
<OnEnter>
Guda_BagSlot_OnEnter(this, 0)
Guda_BagFrame_HighlightBagSlots(0)
</OnEnter>
<OnLeave>
GameTooltip:Hide()
@@ -373,7 +372,6 @@
</OnClick>
<OnEnter>
Guda_BagSlot_OnEnter(this, 1)
Guda_BagFrame_HighlightBagSlots(1)
</OnEnter>
<OnDragStart>
Guda_BagSlot_OnDragStart(this, 1)
@@ -414,7 +412,6 @@
</OnClick>
<OnEnter>
Guda_BagSlot_OnEnter(this, 2)
Guda_BagFrame_HighlightBagSlots(2)
</OnEnter>
<OnDragStart>
Guda_BagSlot_OnDragStart(this, 2)
@@ -455,7 +452,6 @@
</OnClick>
<OnEnter>
Guda_BagSlot_OnEnter(this, 3)
Guda_BagFrame_HighlightBagSlots(3)
</OnEnter>
<OnDragStart>
Guda_BagSlot_OnDragStart(this, 3)
@@ -496,7 +492,6 @@
</OnClick>
<OnEnter>
Guda_BagSlot_OnEnter(this, 4)
Guda_BagFrame_HighlightBagSlots(4)
</OnEnter>
<OnDragStart>
Guda_BagSlot_OnDragStart(this, 4)
@@ -552,13 +547,6 @@
Guda_BagFrame_ToggleKeyring()
</OnClick>
<OnEnter>
GameTooltip:SetOwner(this, "ANCHOR_TOP")
GameTooltip:SetText("Keyring", 1.0, 1.0, 1.0)
local numSlots = GetContainerNumSlots(-2) or 0
GameTooltip:AddLine(string.format("%d Slots", numSlots), 0.8, 0.8, 0.8)
GameTooltip:AddLine("(Right-click to toggle)", 0.5, 0.8, 0.5)
GameTooltip:Show()
Guda_BagFrame_HighlightBagSlots(-2)
Guda_BagSlot_OnEnter(this, -2)
</OnEnter>
<OnLeave>