WoW:API SetOverrideBindingClick: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Updated with new information)
 
m (Move page script moved page API SetOverrideBindingClick to API SetOverrideBindingClick without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}} {{protectedcombatapi|2.0}}
Creates an override binding that performs a button click.
SetOverrideBindingClick(owner, isPriority, "key", "buttonName"[, "mouseClick"]);


Sets an override binding that acts like a mouse click on a button.
== Arguments ==
; owner : Frame - The frame this binding "belongs" to; this can later be used to clear all override bindings belonging to a particular frame.
; isPriority : Boolean - true if this is a priority binding, false otherwise. Both types of override bindings take precedence over normal bindings.
; key : String - Binding to bind the command to. For example, "Q", "ALT-Q", "ALT-CTRL-SHIFT-Q", "BUTTON5"
; buttonName : String - Name of the button widget this binding should fire a click event for.
; mouseClick : String - Mouse button name argument passed to the OnClick handlers.


----
== Details ==
;''Arguments''
* Override bindings take precedence over the normal {{api|SetBinding}} bindings. Priority override bindings take precedence over non-priority override bindings.
* Override bindings are never saved, and will be wiped by an interface reload.
* You cannot use this function to clear an override binding; use {{api|SetOverrideBinding}} instead.


:(table owner, boolean isPriority, string key, string buttonName [, string mouseClick])
== See also ==
 
* {{api|SetOverrideBinding}}
:;owner : (table) The frame responsible for setting the override.
* {{api|SetOverrideBindingSpell}}
:;isPriority : (boolean) Indicates that this is a priority override binding.
* {{api|SetOverrideBindingItem}}
:;key : (string) The key to bind to the button (e.g. "CTRL-2").
* {{api|SetOverrideBindingMacro}}
:;buttonName : (string) The name of the button to which the key will be bound or nil to remove the override binding.
:;mouseClick : (string) The mouse button sent to the button's OnClick handler (e.g. "LeftButton").
 
----
;''Example''
-- Set CTRL-X key to act like a right mouse click on the specified button
local button = SomeButton;
SetOverrideBindingClick(button, false, "CTRL-X", button:GetName(), "RightButton");
 
----

Latest revision as of 04:47, 15 August 2023

WoW API < SetOverrideBindingClick

Creates an override binding that performs a button click.

SetOverrideBindingClick(owner, isPriority, "key", "buttonName"[, "mouseClick"]);

Arguments[edit]

owner
Frame - The frame this binding "belongs" to; this can later be used to clear all override bindings belonging to a particular frame.
isPriority
Boolean - true if this is a priority binding, false otherwise. Both types of override bindings take precedence over normal bindings.
key
String - Binding to bind the command to. For example, "Q", "ALT-Q", "ALT-CTRL-SHIFT-Q", "BUTTON5"
buttonName
String - Name of the button widget this binding should fire a click event for.
mouseClick
String - Mouse button name argument passed to the OnClick handlers.

Details[edit]

  • Override bindings take precedence over the normal SetBinding bindings. Priority override bindings take precedence over non-priority override bindings.
  • Override bindings are never saved, and will be wiped by an interface reload.
  • You cannot use this function to clear an override binding; use SetOverrideBinding instead.

See also[edit]