WoW:API ChangeActionBarPage: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<center>'''ChangeActionBarPage''' - ''Documentation by The Nerd Wonder''</center>
{{wowapi}}


Changes the current action button set.
Changes the current action button set to the one specified in CURRENT_ACTIONBAR_PAGE variable.


  ChangeActionBarPage()
  ChangeActionBarPage()
Line 31: Line 31:
----
----
__NOTOC__
__NOTOC__
{{Template:WoW API}}

Revision as of 18:09, 30 June 2006

WoW API < ChangeActionBarPage

Changes the current action button set to the one specified in CURRENT_ACTIONBAR_PAGE variable.

ChangeActionBarPage()

Parameters

Arguments

()

Returns

nil

Example

function ActionBar_PageUp()
   CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE + 1;
   if ( CURRENT_ACTIONBAR_PAGE > NUM_ACTIONBAR_PAGES ) then
      CURRENT_ACTIONBAR_PAGE = 1;
   end
   ChangeActionBarPage();
end

Result

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.

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 (Whether the event fires when there hasn't actually been a change is untested).