Thread Tools Display Modes
10-26-19, 09:55 AM   #1
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Binding a SecureActionButton

Hello,

I know how to create basic bindings with a Bindings.xml file, like this:
Code:
<Bindings>
	<Binding name="SOMETHING" header="XXX">
		MyAddon.MyFunction();
	</Binding>
</Bindings>
but I don't understand how to bind some personal buttons created from the "SecureActionButtonTemplate" template. As my buttons are protected and only contains macros, I can't call any lua functions.

Thank you.
  Reply With Quote
10-26-19, 08:25 PM   #2
kurapica.igas
A Chromatic Dragonspawn
Join Date: Aug 2011
Posts: 152
Out of the combat, you can use

Lua Code:
  1. SetOverrideBindingClick(Your_button, true, "B", "Your_button_name", "LeftButton")

To bind key, and use

Lua Code:
  1. ClearOverrideBindings(Your_button)

to release the binding key
  Reply With Quote
10-26-19, 09:29 PM   #3
Voopie
A Murloc Raider
 
Voopie's Avatar
Join Date: Sep 2018
Posts: 4
I use the following:

Lua Code:
  1. <Bindings>
  2.     <Binding name="CLICK SECUREACTIONBUTTON_NAME:LeftButton" header="XXX">
  3.         -- Empty
  4.     </Binding>
  5. </Bindings>

And localization:

Lua Code:
  1. _G["BINDING_NAME_CLICK SECUREACTIONBUTTON_NAME:LeftButton"] = "SOMETHING";
  Reply With Quote
10-27-19, 06:19 AM   #4
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
It works
Thanks.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Binding a SecureActionButton

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off