WoW:SecureUnitButtonTemplate: Difference between revisions
Jump to navigation
Jump to search
m
Move page script moved page SecureUnitButtonTemplate to WoW:SecureUnitButtonTemplate without leaving a redirect
(menufunc parameters?) |
m (Move page script moved page SecureUnitButtonTemplate to WoW:SecureUnitButtonTemplate without leaving a redirect) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{uitech}} | {{uitech}} | ||
'''SecureUnitButtonTemplate''' is one of the SecureTemplates introduced in | '''SecureUnitButtonTemplate''' is one of the SecureTemplates introduced in Patch 2.0. It's purpose is to allow creation of unit frames, executing certain protected actions from secure code in response to clicks. | ||
This template's behavior differs only slightly from [[SecureActionButtonTemplate]], and can be thought of as a special case. The only difference is in how the menu function is handled: the template allows spells currently being targeted to be cancelled before calling the menu function. | This template's behavior differs only slightly from [[SecureActionButtonTemplate]], and can be thought of as a special case. The only difference is in how the menu function is handled: the template allows spells currently being targeted to be cancelled before calling the menu function. | ||
| Line 10: | Line 10: | ||
:; unit : String - unit this unit frame is showing/acting on. | :; unit : String - unit this unit frame is showing/acting on. | ||
:; menuFunc : Function - menu function to show when the frame is right clicked. | :; menuFunc : Function - menu function to show when the frame is right clicked. | ||
The function sets a limited number of attributes on a frame to make it behave like the default unit frames: left clicks target the unit, and right clicks open the menu by calling menuFunc | The function sets a limited number of attributes on a frame to make it behave like the default unit frames: left clicks target the unit, and right clicks open the menu by calling menuFunc(self, unit, button). | ||