The Nerd Wonder@legacy41576556 (talk | contribs) (Changes the current action button set.) |
Baytoon@legacy41526920 (talk | contribs) |
||
(11 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{wowapi}} |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | ChangeActionBarPage(actionBarPage) |
||
− | ---- |
||
+ | == Parameters == |
||
− | + | === Arguments === |
|
+ | :(actionBarPage) |
||
+ | :;actionBarPage : Numeric - Which page of your action bar to switch to. Expects an integer 1-6. |
||
− | No arguments are passed. This function checks the current value of the global CURRENT_ACTIONBAR_PAGE and sets the action bar to show that page. Possible page numbers are in the range 1 - NUM_ACTIONBAR_PAGES. |
||
+ | === Returns === |
||
− | ---- |
||
− | + | :''nil'' |
|
⚫ | |||
− | :;nil |
||
+ | <!-- begin code --> |
||
+ | function ActionBar_FirstPage() |
||
⚫ | |||
⚫ | |||
+ | <!-- end code --> |
||
+ | Or for a macro: |
||
− | ---- |
||
⚫ | |||
+ | <!-- begin code --> |
||
− | function ActionBar_PageUp() |
||
⚫ | |||
− | CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE + 1; |
||
+ | <!-- end code --> |
||
− | if ( CURRENT_ACTIONBAR_PAGE > NUM_ACTIONBAR_PAGES ) then |
||
− | CURRENT_ACTIONBAR_PAGE = 1; |
||
− | end |
||
⚫ | |||
⚫ | |||
+ | == Details == |
||
− | This function does the same thing as pressing the Page Up button. It increments CURRENT_ACTIONBAR_PAGE, checks for a valid page number, then calls ChangeActionBarPage() to change the action bar. |
||
+ | : Notifies the UI that the current action button set has been updated to the current value of the CURRENT_ACTIONBAR_PAGE global variable. |
||
+ | : Will cause an ACTIONBAR_PAGE_CHANGED event to fire only if there was actually a change (tested in 2.3.0). |
||
− | This function can be found in Interface/FrameXML/ActionButton.lua. |
||
− | |||
− | ---- |
||
− | ;''Description'' |
||
+ | : Do nothing in combat mode |
||
− | : Changes the current action button set. |
||
---- |
---- |
||
+ | __NOTOC__ |
||
− | {{Template:WoW API}} |
Revision as of 06:33, 17 February 2008
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Changes the current action button to the one specified in the arguments.
ChangeActionBarPage(actionBarPage)
Parameters
Arguments
- (actionBarPage)
- actionBarPage
- Numeric - Which page of your action bar to switch to. Expects an integer 1-6.
Returns
- nil
Example
function ActionBar_FirstPage() ChangeActionBarPage(1); end
Or for a macro:
/script ChangeActionBarPage(2);
Details
- Notifies the UI that the current action button set has been updated to the current value of the CURRENT_ACTIONBAR_PAGE global variable.
- Will cause an ACTIONBAR_PAGE_CHANGED event to fire only if there was actually a change (tested in 2.3.0).
- Do nothing in combat mode