fix: hovering on bag slot item
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user