API:SetHotbarPage
From RoR Wiki
UI Lua API · Hotbar functions
Version: WAR 1.4.8
Makes an action bar show a different hotbar page.
SetHotbarPage(physicalPage, logicalPage)
Arguments
- physicalPage
number– Action bar, 1 to 11.- logicalPage
number– Hotbar page to show on it, 1 to 11.
Returns
Nothing.
Details
- The 12 slots of the action bar are pointed at the 12 entries of the chosen page. The client then refreshes the enabled state of all slots, notifies the UI for each of the 12 slots, and broadcasts an event to the UI with the two page numbers.
- Values outside 1 to 11 are ignored.
- The client ignores the call while a particular player state flag is set.
- If there is no player object, nothing happens.
- The function needs at least two arguments and only reads the last two.
Errors
None besides the generic Invalid Parameters message when an argument is not a number.
Example
Paging up, from ea_actionbars/source/actionbars.lua:
SetHotbarPage (self.m_PhysicalPage, self:ValidateLogicalPage (self.m_DisplayPage + 1))
Resetting every bar to its own page, from easystem_actionbarclustermanager/source/actionbarclustermanager.lua:
SetHotbarPage (barIndex, barIndex)
