Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetHotbarPage

From RoR Wiki

UI Lua API · Hotbar functions
Version: WAR 1.4.8

Returns which hotbar page an action bar is showing.

logicalPage = GetHotbarPage(physicalPage)

Arguments

physicalPage
number – Action bar, 1 to 11.

Returns

logicalPage
number – Hotbar page shown on that bar, 1 to 11.

Details

  • The 132 hotbar slots are grouped in 11 pages of 12. Each action bar ("physical page") shows one page ("logical page"); SetHotbarPage changes which.
  • The page is worked out from the first slot of the bar.
  • For a physicalPage outside 1 to 11, or when there is no player object, nothing is returned.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From ea_actionbars/source/actionbars.lua:

logicalPage         = logicalPage or GetHotbarPage (physicalPage)

See also