fix: quest bar display
This commit is contained in:
@@ -7,4 +7,10 @@
|
||||
-- Use safe global wrapper that defers until addon is ready
|
||||
Guda_ToggleBank()
|
||||
</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>
|
||||
|
||||
@@ -4,5 +4,7 @@
|
||||
BINDING_HEADER_GUDA = "Guda"
|
||||
BINDING_NAME_GUDA_TOGGLE_BAGS = "Toggle Bags"
|
||||
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
|
||||
|
||||
@@ -340,6 +340,21 @@ function QuestItemBar:UpdateCooldowns()
|
||||
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()
|
||||
local frame = CreateFrame("Frame", "Guda_QuestItemBar", UIParent)
|
||||
frame:SetWidth(40)
|
||||
|
||||
Reference in New Issue
Block a user