Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:HorizontalScrollbarGetMaxScrollPosition

From RoR Wiki
Revision as of 19:45, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Scrollbar functions
Version: WAR 1.4.8

Returns the maximum scroll position of a HorizontalScrollbar.

maxPosition = HorizontalScrollbarGetMaxScrollPosition(scrollbarName)

Arguments

scrollbarName
string – Name of the HorizontalScrollbar.

Returns

maxPosition
number – The maximum scroll position.

Details

  • The highest position the scrollbar can actually reach is this value minus the page size (see HorizontalScrollbarGetPageSize).
  • The stock UI never calls this function.

Errors

The error messages use the name ButtonGetPressedFlag:

  • Error in function call 'ButtonGetPressedFlag': Window %s does not exist
  • Error in function call 'ButtonGetPressedFlag': Window %s is not a HorizontalScrollbar

Example

A minimal example built from the signature:

local lastPos = HorizontalScrollbarGetMaxScrollPosition( "MyScrollbar" ) - HorizontalScrollbarGetPageSize( "MyScrollbar" )

See also