fix: hovering on bag slot item

This commit is contained in:
Salikh Gurgenidze
2025-11-18 21:35:11 +04:00
parent 9b2dcef6ad
commit 5a2b302c85
3 changed files with 87 additions and 0 deletions
+29
View File
@@ -1600,6 +1600,35 @@ function Guda_BagFrame_ClearHighlightedSlots()
end
end
-- Highlight a specific bag button in the toolbar
function Guda_BagFrame_HighlightBagButton(bagID)
if not bagID then return end
-- Bag 0 (backpack) has no button in the toolbar, only bags 1-4
if bagID == 0 then return end
-- Bag buttons are named: Guda_BagFrame_Toolbar_BagSlot1 through BagSlot4
local buttonName = "Guda_BagFrame_Toolbar_BagSlot" .. bagID
local button = getglobal(buttonName)
if button then
-- Set the button's pushed texture to highlight it
button:LockHighlight()
end
end
-- Clear bag button highlighting
function Guda_BagFrame_ClearBagButtonHighlight()
-- Clear highlight from all bag buttons (1-4, no button for bag 0)
for bagID = 1, 4 do
local buttonName = "Guda_BagFrame_Toolbar_BagSlot" .. bagID
local button = getglobal(buttonName)
if button then
button:UnlockHighlight()
end
end
end
-- Initialize
function BagFrame:Initialize()
-- Hook default bag functions