AdiButtonAuras

AdiButtonAuras

404k Downloads

Support dynamically created action buttons using the ActionBarActionButtonMixin template

Tuller opened this issue ยท 7 comments

commented

This is a followup on #349 The issue with Dominos is that I create action buttons later in the cycle (after PLAYER_LOGIN) so your ScanButtons call isn't catching those.

hooksecurefunc(ActionBarActionButtonMixin, "OnLoad", function(button)
   -- initialize button here
end)

This doesn't cover anything that's created before AdiButtonAuras sets up the hook, but it does cover everything afterwards.

commented

Oh, this is possibly why some rules were failing on the Beta when I was swapping specs at the test dummies to fix spell data changes.

commented

29dc5fb should address this issue.

@Tuller is this enough of a fix or do I miss something here? Btw hooking the mixin does not work, probably because I need to hook on the object where the mixin is mixed in.

On a side note, mouse hovering over Dominos buttons seems to trigger the Update function twice (on stock ui it is once). Not sure if you are double dipping somewhere, please discard this if it is non-sense.

commented

hooksecurefunc replaces the original function by a wrapper, this is why hooking the mixin does not work for the stock ui - I can't hook it before the stock consumes the mixin.

Still leaning basics after all those years :) Thanks again @Tuller for making me realize my gaps :)

commented

Hurray :)

commented

That looks like it would work for just Dominos. I was going for an approach that would hopefully cover everything

commented

Sadly I can't hook the mixin or the ActionBarButtonTemplate. I already tried the former in 893132f.

I would close this then, please feel free to reopen if you have any follow-ups.

commented

Ah I can actually use the ActionBarActionButtonMixin, it just does not work for the stock ui action buttons for whatever reason.

hooksecurefunc(ActionBarActionButtonMixin, 'Update', function(button)
	addon:Debug('Mixin hook fired', button:GetName())
end)

just never fires for the stock ui.