Hey guys,
I'm having problems having my key binding invoke the button's spell.
My bindings.xml shows in the game's Key Bindings and is as follow:
Code:
<Bindings>
<Binding name="WTT_KEY1" description="Key 1" header="WTTOOLS">
WTTKey1();
</Binding>
</Bindings>
The WTTKey1() function is called, but that is not the result I'm looking for. I have a button defined as follow that I want invoked when the user presses the key bind:
Code:
IconDefault = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")
IconDefault:SetAttribute("type", "spell")
IconDefault:SetAttribute("spell", "<spell>")
Where "<spell>" is the spell I want to cast, such as Devastate. The buttons work fine when I click on them, but I cannot get the binding working.
I'm pretty sure I'm missing an important bit, and I was not successful trying to make sense of other addons managing this.
Anyone can point me in the right direction with this?
Thanks!!
PS: I forgot to mention that I need to have the keybinding that the user can modify, and not hardcoded in he lua file.