Navigation menu

WoW:SecureUnitButtonTemplate: Difference between revisions

Jump to navigation Jump to search
argument list
(menufunc parameters?)
(argument list)
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 with (self, button) arguments (''possibly incorrect, see discussion'').
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).