Hello folks,
I have a small problem that I just can't get any further. Since the Dragonflight update, I can no longer press any buttons in my addon. I've tried pretty much everything I knew, but I just can't do it.
Perhaps one of you can help me to solve the problem. I would be very very grateful.
I uploaded the addon in the attachment.
I think the problem is somewhere in this area in main.lua
Lua Code:
-- Create the Clickable Portable Buttons
function me:CreateUI_Buttons()
local n
-- Create each button using a Secure Action template
for n = 1, me.MAX_BUTTONS do
local button = "button"..tostring(n)
-- Each "button" is really a Frame with a Button, Texture, and Text
me.ui[button] = CreateFrame("Frame", "PortableUIButton"..tostring(n), me.ui.container)
me.ui[button].ID = n
me.ui[button]:SetScript("OnEnter", function(self, ...)
me:DoScript_OnEnter(self, ...)
end)
me.ui[button]:SetScript("OnLeave", function(self, ...)
me:DoScript_OnLeave(self, ...)
end)
-- The Secure Action Button
me.ui[button].sab = CreateFrame("Button", "PortableUIButton"..tostring(n).."SAB", me.ui[button], "SecureActionButtonTemplate")
me.ui[button].sab:RegisterForClicks("LeftButtonDown", "RightButtonDown")
me.ui[button].sab:SetScript("OnEnter", function(self, ...)
me:DoScript_OnEnter(self, ...)
end)
me.ui[button].sab:SetScript("OnLeave", function(self, ...)
me:DoScript_OnLeave(self, ...)
end)
me.ui[button].sab:HookScript("OnClick", function(self, ...)
me:DoScript_OnClick(self, ...)
end)
me.ui[button].sab:SetAllPoints(me.ui[button])
-- Disabled Texture (If a mage doesn't know a spell, it will be greyed out)
me.ui[button].disabled = me.ui[button]:CreateTexture(nil, "ARTWORK")
me.ui[button].disabled:SetAllPoints(me.ui[button])
-- Text (Shows the name of the destination)
me.ui[button].text = CreateFrame("Frame", nil, me.ui[button])
me.ui[button].text:SetAllPoints(me.ui[button])
me.ui[button].text.name = me.ui[button].text:CreateFontString(nil)
me.ui[button].text.name:SetFont("Fonts\\ARHei.ttf", 12, "") -- Default font, we don't want a nil font
me.ui[button].text.name:SetJustifyV("TOP")
end
end