• 1 page(s)
SecureActionButtonTemplate question

I'm trying to modify Totemus3 so that I can hide the buttons that choose the totems to make it a bit more compact.  These buttons are derived from the SecureActionButtonTemplate.  As it is now, the buttons are always visible and when you left click on them they cast the appropriate totem.  After much fiddling with the addon I got the menus to hide and then show when I right click them.  However, now the spells do not cast when I click on the button.  I know that the type and data attributes are being set, but when I click the button it does nothing.  The mod recognizes that I clicked the button however because then the menu hides itself (what I want it to do).  I'm caught up on why the spell will not cast when all I do is hide the button and then show it later.

If it matters, I use HideUIPanel and ShowUIPanel to hide and show the button, respectivly.

If any more information is needed, let me know.  Thanks in advance for any help.

 

~Crofe

Report this thread post

For anyone who's intersted, I did get this working.  I think it didn't like the order things were happening.  The code was hidding the button before the spell was being cast, so I think that when the button is hidden it becomes disabled.  So the sequence was Click the button -> Handle the Click by hiding the button -> Cast the spell (but we don't know what spell / the action never happens because the button isn't there anymore).

I got it working now so that the hiding of the button is handled inside the spell casting handler.  So no the sequence is Click the button -> Cast the spell -> Hide the button.  This part is working now.  Unfortunatly, now there are other issues (aren't there always :)).

Anyway, just some insight to SecureActionButtons.

~Crofe

Report this thread post
  • 1 page(s)
Subscribe to this thread: (you will receive emails when new posts are made)