WoW:API ActionButtonDown: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(added to protected category)
m (Move page script moved page API ActionButtonDown to API ActionButtonDown without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{protectedapi|2.0|}}
{{protectedapi|2.0|}}
{{framexmlfunc|FrameXML/ActionButton.lua}} __NOTOC__
{{framexmlfunc|FrameXML/ActionButton.lua}}  
 


  ActionButtonDown(buttonID);
  ActionButtonDown(buttonID);
Line 7: Line 6:
Presses the specified action button.
Presses the specified action button.


== Parameters ==
* buttonID (number) - The button ID of the button to push


==Parameters==
== Returns ==
'''Arguments'''
* nil
:(Number buttonID)
:;buttonID : The button ID of the button to push
 
'''Returns'''
:;nil


== Description ==
Changes buttonID's state to PUSHED.


==Example==
== Example ==
  ActionButtonDown(1);
  ActionButtonDown(1);


'''Result'''
Result
:#Checks if BonusActionBarFrame is visible.
:#Checks if BonusActionBarFrame is visible.
:#If true -
:#If true -
Line 31: Line 29:
:##Changes ActionButton1's state to PUSHED.
:##Changes ActionButton1's state to PUSHED.


==Description==
== Notes ==
:Changes buttonID's state to PUSHED.
Works with ActionBarFrame & BonusActionBarFrame.
:NOTE: Works with ActionBarFrame & BonusActionBarFrame.

Latest revision as of 04:45, 15 August 2023

WoW API < ActionButtonDown

"I" iconThis function is implemented in Lua here FrameXML/ActionButton.lua.
ActionButtonDown(buttonID);

Presses the specified action button.

Parameters[edit]

  • buttonID (number) - The button ID of the button to push

Returns[edit]

  • nil

Description[edit]

Changes buttonID's state to PUSHED.

Example[edit]

ActionButtonDown(1);

Result

  1. Checks if BonusActionBarFrame is visible.
  2. If true -
    1. Checks if BonusActionButton1 is in state NORMAL.
    2. If true -
      1. Changes BonusActionButton1's state to PUSHED.
    3. Returns.
  3. Checks if ActionButton1 is in state NORMAL.
  4. If true -
    1. Changes ActionButton1's state to PUSHED.

Notes[edit]

Works with ActionBarFrame & BonusActionBarFrame.