Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
mNo edit summary
m (Formatting)
Line 1: Line 1:
<center>'''ChangeActionBarPage''' ''-Documentation by The Nerd Wonder''</center>
+
<center>'''ChangeActionBarPage''' - ''Documentation by The Nerd Wonder''</center>
   
 
Changes the current action button set.
 
Changes the current action button set.
   
 
ChangeActionBarPage()
----
 
  +
== Parameters ==
;''Arguments''
+
=== Arguments ===
  +
:()
   
 
=== Returns ===
<!-- List each argument, together with its type -->
 
  +
:<i>nil</i>
 
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
 
 
----
 
;''Example''
 
   
 
== Example ==
  +
<!-- begin code -->
 
function ActionBar_PageUp()
 
function ActionBar_PageUp()
 
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE + 1;
 
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE + 1;
if ( CURRENT_ACTIONBAR_PAGE > NUM_ACTIONBAR_PAGES ) then
+
if ( CURRENT_ACTIONBAR_PAGE &gt; NUM_ACTIONBAR_PAGES ) then
 
CURRENT_ACTIONBAR_PAGE = 1;
 
CURRENT_ACTIONBAR_PAGE = 1;
 
end
 
end
 
ChangeActionBarPage();
 
ChangeActionBarPage();
 
end
 
end
  +
<!-- end code -->
  +
==== 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 ==
;''Result''
 
  +
: Notifies the UI that the current action button set has been updated to the current value of the CURRENT_ACTIONBAR_PAGE global variable.
 
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.
 
 
This function can be found in Interface/FrameXML/ActionButton.lua.
 
 
----
 
;''Details''
 
   
  +
: Will cause an ACTIONBAR_PAGE_CHANGED event to fire (Whether the event fires when there hasn't actually been a change is untested).
: Changes the current action button set.
 
   
 
----
 
----
  +
__NOTOC__
 
{{Template:WoW API}}
 
{{Template:WoW API}}
[[Category:API Functions|ChangeActionBarPage]]
 
 
[[Category:API Action Functions|ChangeActionBarPage]]
 
[[Category:API Action Functions|ChangeActionBarPage]]

Revision as of 01:48, 20 September 2005

ChangeActionBarPage - Documentation by The Nerd Wonder

Changes the current action button set.

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).

Template:WoW API