From d3a4ad9923bb2cb6ea9d520d98b77f4274ddb040 Mon Sep 17 00:00:00 2001 From: Salikh Gurgenidze Date: Tue, 18 Nov 2025 21:41:23 +0400 Subject: [PATCH] fix: keyring icon --- UI/BagFrame.lua | 24 ++++++++++++++++++------ UI/BagFrame.xml | 39 ++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/UI/BagFrame.lua b/UI/BagFrame.lua index b19ce1e..eff20bd 100644 --- a/UI/BagFrame.lua +++ b/UI/BagFrame.lua @@ -1604,13 +1604,19 @@ end 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 + local buttonName + if bagID == -2 then + -- Keyring button + buttonName = "Guda_BagFrame_Toolbar_KeyringButton" + elseif bagID >= 1 and bagID <= 4 then + -- Bag buttons 1-4 + buttonName = "Guda_BagFrame_Toolbar_BagSlot" .. bagID + else + -- Bag 0 (backpack) has no button in the toolbar + 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() @@ -1619,7 +1625,7 @@ end -- Clear bag button highlighting function Guda_BagFrame_ClearBagButtonHighlight() - -- Clear highlight from all bag buttons (1-4, no button for bag 0) + -- Clear highlight from all bag buttons (1-4) for bagID = 1, 4 do local buttonName = "Guda_BagFrame_Toolbar_BagSlot" .. bagID local button = getglobal(buttonName) @@ -1627,6 +1633,12 @@ function Guda_BagFrame_ClearBagButtonHighlight() button:UnlockHighlight() end end + + -- Clear keyring button highlight + local keyringButton = getglobal("Guda_BagFrame_Toolbar_KeyringButton") + if keyringButton then + keyringButton:UnlockHighlight() + end end -- Initialize diff --git a/UI/BagFrame.xml b/UI/BagFrame.xml index 4a51d04..3462f98 100644 --- a/UI/BagFrame.xml +++ b/UI/BagFrame.xml @@ -434,7 +434,7 @@ -