Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:PageWindowGetCurrentPage

From RoR Wiki

UI Lua API · PageWindow functions
Version: WAR 1.4.8

Returns the page a PageWindow is showing.

page = PageWindowGetCurrentPage(pageWindowName)

Arguments

pageWindowName
string – Name of the PageWindow.

Returns

page
number – Number of the current page, counted from 1. For a PageWindow that shows several pages side by side, this is the first (leftmost) page shown.

Details

Errors

  • Error in function call 'PageWindowGetCurrentPage': Window %s does not exist
  • Error in function call 'PageWindowGetCurrentPage': Window %s is not a PageWindow

Example

From TomeWindow.FlipPageWindowBackward in default/ea_tomeofknowledge/source/tomewindow.lua:

local curPage   = PageWindowGetCurrentPage( pageWindow )
if( curPage == 1 ) then
    return false
end

See also