Skip to content

Commit

Permalink
Temp v1 fix for button command
Browse files Browse the repository at this point in the history
  • Loading branch information
Neogeekmo committed Apr 18, 2024
1 parent cdae302 commit 3adc7ba
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions frames/selectButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,21 @@ function AprRC.SelectButton:Show()
btnItem:SetFullWidth(true)
btnItem:SetCallback("OnClick", function()
AceGUI:Release(frame)
AprRC.questionDialog:CreateEditBoxPopupWithCallback("Item Button (ID)", function(text)
local currentStep = AprRC:GetLastStep()
currentStep.Button = tonumber(text, 10)
print("|cff00bfff Button |r Added")
AprRC.questionDialog:CreateEditBoxPopupWithCallback("QuestID for the button (ID)", function(questID)
C_Timer.After(0.2, function()
AprRC.questionDialog:CreateEditBoxPopupWithCallback("Objective index of the quest", function(index)
C_Timer.After(0.2, function()
AprRC.questionDialog:CreateEditBoxPopupWithCallback("Item Button (ID)", function(itemID)
local currentStep = AprRC:GetLastStep()
if not currentStep.Button then
currentStep.Button = {}
end
currentStep.Button[questID .. "-" .. index] = tonumber(itemID, 10)
print("|cff00bfff Button |r Added")
end)
end)
end)
end)
end)
end)
buttonGroup:AddChild(btnItem)
Expand All @@ -35,10 +46,21 @@ function AprRC.SelectButton:Show()
btnSpell:SetFullWidth(true)
btnSpell:SetCallback("OnClick", function()
AceGUI:Release(frame)
AprRC.questionDialog:CreateEditBoxPopupWithCallback("Spell Button (ID)", function(text)
local currentStep = AprRC:GetLastStep()
currentStep.SpellButton = tonumber(text, 10)
print("|cff00bfff SpellButton |r Added")
AprRC.questionDialog:CreateEditBoxPopupWithCallback("QuestID for the button (ID)", function(questID)
C_Timer.After(0.2, function()
AprRC.questionDialog:CreateEditBoxPopupWithCallback("Objective index of the quest", function(index)
C_Timer.After(0.2, function()
AprRC.questionDialog:CreateEditBoxPopupWithCallback("Spell Button (ID)", function(spellID)
local currentStep = AprRC:GetLastStep()
if not currentStep.SpellButton then
currentStep.SpellButton = {}
end
currentStep.SpellButton[questID .. "-" .. index] = tonumber(spellID, 10)
print("|cff00bfff SpellButton |r Added")
end)
end)
end)
end)
end)
end)
buttonGroup:AddChild(btnSpell)
Expand Down

0 comments on commit 3adc7ba

Please sign in to comment.