49
edits
No edit summary |
|||
| Line 1: | Line 1: | ||
{{uitech}}The '''SecureActionButtonTemplate''' was introduced in [[Patch 2.0]] to allow addons to perform protected actions -- casting spells, executing macros, etc -- by specifying button behavior via its attributes. | {{uitech}} | ||
The '''SecureActionButtonTemplate''' was introduced in [[Patch 2.0]] to allow addons to perform protected actions -- casting spells, executing macros, etc -- by specifying button behavior via its attributes. | |||
== Creating a SecureActionButton == | == Creating a SecureActionButton == | ||
| Line 17: | Line 18: | ||
== Modified attributes == | == Modified attributes == | ||
{| class="darktable | {| class="darktable" | ||
! Attribute !! Used on... | ! Attribute !! Used on... | ||
|- | |- | ||
| | | type || Any clicks. | ||
|- | |- | ||
| | | *type1 || Any left click. | ||
|- | |- | ||
| | | type1 || Unmodified left click. | ||
|- | |- | ||
| | | shift-type2 || Shift+right click. (But not Alt+Shift+right click) | ||
|- | |- | ||
| | | shift-type* || Shift+any button click. | ||
|- | |- | ||
| | | alt-ctrl-shift-type* || Alt+Control+Shift+any button click. | ||
|- | |- | ||
| <s>ctrl-alt-shift-type*</s> || Invalid, as modifiers are in the wrong order. | |||
|} | |} | ||
Some attribute may change value based on whether a particular combination of modifier keys is held down and/or a particular button is being clicked. Those attributes are typically called modified attributes, and are resolved by the SecureButton_GetModifiedAttribute function. | Some attribute may change value based on whether a particular combination of modifier keys is held down and/or a particular button is being clicked. Those attributes are typically called modified attributes, and are resolved by the SecureButton_GetModifiedAttribute function. | ||