WoW:SecureActionButtonTemplate: Difference between revisions

m
User-controlled Bot: table syntax updated
m (User-controlled Bot: table syntax updated)
Line 37: Line 37:
===actionbar===
===actionbar===
A button of this type changes your current action bar.<br />
A button of this type changes your current action bar.<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td>action</td>
|-----
<td>May be "increment", "decrement", or an integer which specifies the page to switch to.</td>
| action
</tr>
| May be "increment", "decrement", or an integer which specifies the page to switch to.
</table>
|}


  frame:SetAttribute("type1", "actionbar") -- Sets this frame's left click type to "actionbar"
  frame:SetAttribute("type1", "actionbar") -- Sets this frame's left click type to "actionbar"
Line 52: Line 52:
Executes an action. Calls UseAction(self:GetAttribute("action"), 1, self:GetAttribute("unit"))
Executes an action. Calls UseAction(self:GetAttribute("action"), 1, self:GetAttribute("unit"))
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td>action</td>
|-----
<td>(integer) The action slot to execute</td>
| action
</tr>
| (integer) The action slot to execute
</table>
|}


  frame:SetAttribute("type1", "action")
  frame:SetAttribute("type1", "action")
Line 68: Line 68:
Executes a pet action. Calls CastPetAction(self:GetAttribute("action"), self:GetAttribute("unit"))
Executes a pet action. Calls CastPetAction(self:GetAttribute("action"), self:GetAttribute("unit"))
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td>action</td>
|-----
<td>(integer) The pet action slot to execute</td>
| action
</tr>
| (integer) The pet action slot to execute
</table>
|}


  frame:SetAttribute("type1", "pet")
  frame:SetAttribute("type1", "pet")
Line 84: Line 84:
Casts a spell.
Casts a spell.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td>spell</td>
|-----
<td>The name of the spell to cast. For example, "Flash Heal".</td>
| spell
</tr>
| The name of the spell to cast. For example, "Flash Heal".
</table>
|}


  frame:SetAttribute("type1", "spell")
  frame:SetAttribute("type1", "spell")
Line 100: Line 100:
Uses an item in your inventory (equipped items) or your bags.
Uses an item in your inventory (equipped items) or your bags.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td>slot</td>
|-----
<td>Integer specifying the slot the item to be used is in. If "bag" is set, then this will be a bag slot. If "bag" is not set, then it is an Inventory slot.</td>
| slot
</tr>
| Integer specifying the slot the item to be used is in. If "bag" is set, then this will be a bag slot. If "bag" is not set, then it is an Inventory slot.
<tr>
|-----
<td>bag</td>
| bag
<td>Integer specifying the bag the item to be used is in. Requires that "slot" be set.</td>
| Integer specifying the bag the item to be used is in. Requires that "slot" be set.
</tr>
|-----
<tr>
| item
<td>item</td>
| String specifying the item name. May be used instead of a bag/slot combo. Will not be used if "slot" is set.
<td>String specifying the item name. May be used instead of a bag/slot combo. Will not be used if "slot" is set.</td>
|}
</tr>
</table>


This causes the button to use the item in Slot #1 in your backpack when left clicked:
This causes the button to use the item in Slot #1 in your backpack when left clicked:
Line 131: Line 129:
Executes a macro.
Executes a macro.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
{| border="1" style="border-collapse: collapse;" cellpadding="4"
{| border="1" style="border-collapse: collapse;" cellpadding="4"
|-
|-
Line 153: Line 151:
Cancels a spell if you are targeting a spellcast.
Cancels a spell if you are targeting a spellcast.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td><i>None</i></td>
|-----
</tr>
| ''None''
</table>
|}


Causes this frame to cancel spell targeting when clicked.
Causes this frame to cancel spell targeting when clicked.
Line 171: Line 169:
* Otherwise, targets the unit.
* Otherwise, targets the unit.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td><i>None</i></td>
|-----
</tr>
| ''None''
</table>
|}


  frame:SetAttribute("type", "target")
  frame:SetAttribute("type", "target")
Line 184: Line 182:
Sets your focus to this button's ''unit'' attribute.
Sets your focus to this button's ''unit'' attribute.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td><i>None</i></td>
|-----
</tr>
| ''None''
</table>
|}


Clicking this frame will set your focus to this frame's specified ''unit''.
Clicking this frame will set your focus to this frame's specified ''unit''.
Line 198: Line 196:
Assist the unit specified by this button's ''unit'' attribute and attack their target.
Assist the unit specified by this button's ''unit'' attribute and attack their target.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td><i>None</i></td>
|-----
</tr>
| ''None''
</table>
|}


Clicking this frame will cause you to target and start attacking the target of this button's unit.
Clicking this frame will cause you to target and start attacking the target of this button's unit.
Line 212: Line 210:
Clicks another button. Allows this button to act as a proxy to another button.
Clicks another button. Allows this button to act as a proxy to another button.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td>clickbutton</td>
|-----
<td>The button object that this button will proxy its click to when clicked</td>
| clickbutton
</tr>
| The button object that this button will proxy its click to when clicked
</table>
|}


Clicking this button will call :Click() on myOtherButton.
Clicking this button will call :Click() on myOtherButton.
Line 228: Line 226:
Shows a popup menu.
Shows a popup menu.
<br />
<br />
<b>Attributes:</b>
'''Attributes:'''
<table border="1" style="border-collapse: collapse;" cellpadding="4">
 
<tr>
{| border="1" style="border-collapse: collapse;" cellpadding="4"
<td>Requires that the button have a "showmenu" property set. This property should be a function that takes a unit as a parameter.</td>
|-----
</tr>
| Requires that the button have a "showmenu" property set. This property should be a function that takes a unit as a parameter.
</table>
|}


Clicking this button will call :Click() on myOtherButton.
Clicking this button will call :Click() on myOtherButton.
Anonymous user