WoWInterface - View Single Post - SetBinding issues
View Single Post
09-05-20, 06:37 PM   #6
A Pyroguard Emberseer
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,050
Nope. The only way around it is to write addon code to create an ActionButton, then have the binding click it.

I'd probably use SetOverrideBinding*() so it doesn't clutter Bindings.wtf. The first argument to these functions is the binding's owner. This lets you manage bindings as a group. For example, you can use ClearOverrideBindings() to remove all bindings that are owned by a frame.
Lua Code:
  1. local Button=CreateFrame("Button","AddOnName_ButtonName",nil,"SecureActionButtonTemplate");
  2. Button:SetAttribute("type","macro");
  3. Button:SetAttribute("macrotext","/cast [@mouseover] MySpell");
  4. SetOverrideBindingClick(Button,"F1","AddOnName_ButtonName");
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 09-05-20 at 07:03 PM.
  Reply With Quote