WoW:API ActionButtonUp: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API ActionButtonUp to API ActionButtonUp without leaving a redirect)
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<center>'''ActionButtonUp''' ''-Documentation by AlexanderYoshi''</center>
{{protectedapi|2.0|}}
{{framexmlfunc|FrameXML/ActionButton.lua}}


Release the specified action button.
ActionButtonUp(buttonID [, onSelf]);


ActionButtonUp(buttonID, onSelf);
Releases the specified action button.


----
==Parameters==
;''Arguments''
===Arguments===
:(Number buttonID [,onSelf])


:(Number buttonID)
:;buttonID : The button ID of the button to release (Integers from 1 to 12)
 
:;onSelf : if evaluates to true, casts on yourself no matter the target (See [[API CastSpellByName]])
:;buttonID : The button ID of the button to release
 
:(??? onSelf)
 
:;onSelf : ???
----
;''Returns''


===Returns===
:;nil
:;nil


----
==Example==
;''Example''
  ActionButtonUp(1);
  ActionButtonUp(1);


;''Result''
===Result===
:#Checks if BonusActionBarFrame is Visible.
:#Checks if BonusActionBarFrame is Visible.
:#On True -
:#On True -
Line 49: Line 44:
:###Changes Button 1's SetChecked value to 1.
:###Changes Button 1's SetChecked value to 1.


----
==Description==
;''Description''
:Changes buttonID's state to NORMAL.
:Changes buttonID's state to NORMAL.
:<I>NOTE:</I> Works with ActionBarFrame & BonusActionBarFrame.
:''NOTE:'' Works with ActionBarFrame & BonusActionBarFrame.
 
----
{{Template:WoW API}}
[[Category:World of Warcraft API|ActionButtonUp]]

Latest revision as of 04:45, 15 August 2023

WoW API < ActionButtonUp

"I" iconThis function is implemented in Lua here FrameXML/ActionButton.lua.
ActionButtonUp(buttonID [, onSelf]);

Releases the specified action button.

Parameters[edit]

Arguments[edit]

(Number buttonID [,onSelf])
buttonID
The button ID of the button to release (Integers from 1 to 12)
onSelf
if evaluates to true, casts on yourself no matter the target (See API CastSpellByName)

Returns[edit]

nil

Example[edit]

ActionButtonUp(1);

Result[edit]

  1. Checks if BonusActionBarFrame is Visible.
  2. On True -
    1. Checks if BonusActionButton1 is in state PUSHED.
    2. On True -
      1. Changes BonusActionButton1 to state NORMAL.
      2. If currently editing/writing macro saves the action.
      3. Uses the action associated with the BonusActionButton1
      4. Checks if it's the current action.
      5. If True -
        1. Changes Button 1's SetChecked value to 1.
      6. Else -
        1. Changes Button 1's SetChecked value to 0.
  3. Returns - Ending Function call.
  4. Checks if ActionButton1 is in state PUSHED.
  5. On True -
    1. Changes ActionButton1 to state NORMAL.
    2. If currently editing/writing macro saves the action.
    3. Uses the action associated with the ActionButton1.
    4. Checks if it's the current action.
    5. If True -
      1. Changes Button 1's SetChecked value to 1.
    6. Else -
      1. Changes Button 1's SetChecked value to 1.

Description[edit]

Changes buttonID's state to NORMAL.
NOTE: Works with ActionBarFrame & BonusActionBarFrame.