
Bug: Clickable SecureActionButtonTemplate frame not working with Masque (WA)
Bloodleh opened this issue ยท 5 comments
Game Flavor
Classic Cataclysm
Game Version
4.4.2
Add-On Version
11.1.1
Description
I have created an icon WeakAura which creates a clickable macro button (SecureActionButtonTemplate frame), attaches itself into the aura's frame and positions itself on top of the aura's region. The button works fine until I enable Masque, making the clicks not work and just go "through" the button.
Simplified code (WA init action):
local f = WeakAuras.GetRegion(aura_env.id)
local function initOnce()
-- Clickable button
if not f.button then
f.button = CreateFrame("Button", nil, f, "SecureActionButtonTemplate")
f.button:SetAllPoints(f)
f.button:SetAttribute("type", "macro")
f.button:SetAttribute("unit", "player")
f.button:SetAttribute("macrotext", "/dance")
-- Highlight texture on hover
local hlt = f.button:CreateTexture(nil, "HIGHLIGHT")
hlt:SetColorTexture(1, 1, 1, 0.25)
hlt:SetAllPoints(f.button)
f.button:SetHighlightTexture(hlt)
end
end
initOnce()
Masque seems to add __MSQ_Icon
item onto my button which most likely is the issue, showing up on /fstack: https://imgur.com/a/RNUJzHq
Is there some sort of bug happening with the interaction with custom SecureActionButtonTemplate frames?
Steps to Reproduce
- Create an icon WA with clickable macro button using SecureActionButtonTemplate frame
- Enable Masque addon
- Clicking no longer works
Error Message
No LUA errors at any point.
Screenshots
No response
Notes
No response
I'm not sure what would be causing that. Masque works fine with other SecureActionButtons, as it works on the default action buttons (with a third-party add-on), Dominos (which uses the default buttons) and Bartender (which uses custom SABs).
Ahh, that makes sense! Sorry, it was a user error after all. Should always name my "global" variables something less generic.
That's strange.
I created a minimal version of the icon WA with only the code in init action (same as in my original message), where it still doesn't work: https://wago.io/dOa9jSprD
Also tried disabling Masque for the specific WA: https://i.imgur.com/JyF0bfK.png
Video of the WA without Masque: https://i.imgur.com/8eekiWq.mp4
Video of the WA with Masque enabled: https://i.imgur.com/pDq7VjK.mp4