fix: quest bar display

This commit is contained in:
Salikh Gurgenidze
2025-12-22 02:56:50 +04:00
parent 657cf53507
commit 55b62d7cd5
3 changed files with 23 additions and 0 deletions
+6
View File
@@ -7,4 +7,10 @@
-- Use safe global wrapper that defers until addon is ready -- Use safe global wrapper that defers until addon is ready
Guda_ToggleBank() Guda_ToggleBank()
</Binding> </Binding>
<Binding name="GUDA_USE_QUEST_ITEM_1" header="GUDA">
Guda_UseQuestItem1()
</Binding>
<Binding name="GUDA_USE_QUEST_ITEM_2" header="GUDA">
Guda_UseQuestItem2()
</Binding>
</Bindings> </Bindings>
+2
View File
@@ -4,5 +4,7 @@
BINDING_HEADER_GUDA = "Guda" BINDING_HEADER_GUDA = "Guda"
BINDING_NAME_GUDA_TOGGLE_BAGS = "Toggle Bags" BINDING_NAME_GUDA_TOGGLE_BAGS = "Toggle Bags"
BINDING_NAME_GUDA_TOGGLE_BANK = "Toggle Bank" BINDING_NAME_GUDA_TOGGLE_BANK = "Toggle Bank"
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 -- Additional localization strings can be added here
+15
View File
@@ -340,6 +340,21 @@ function QuestItemBar:UpdateCooldowns()
end end
end end
-- Global wrappers for keybindings
function Guda_UseQuestItem1()
local button = getglobal("Guda_QuestItemBarButton1")
if button and button:IsShown() and button.hasItem and button.bagID and button.slotID then
UseContainerItem(button.bagID, button.slotID)
end
end
function Guda_UseQuestItem2()
local button = getglobal("Guda_QuestItemBarButton2")
if button and button:IsShown() and button.hasItem and button.bagID and button.slotID then
UseContainerItem(button.bagID, button.slotID)
end
end
function QuestItemBar:Initialize() function QuestItemBar:Initialize()
local frame = CreateFrame("Frame", "Guda_QuestItemBar", UIParent) local frame = CreateFrame("Frame", "Guda_QuestItemBar", UIParent)
frame:SetWidth(40) frame:SetWidth(40)