Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:HorizontalScrollbarSetPageSize

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

Meant to set the page size of a HorizontalScrollbar. In the current client it sets the line size instead. See Details.

HorizontalScrollbarSetPageSize(scrollbarName, size)

Arguments

scrollbarName
string – Name of the HorizontalScrollbar.
size
number – The value to store.

Returns

Nothing.

Details

  • The client passes the arguments to the scrollbar in the wrong order: size becomes the line size (returned by HorizontalScrollbarGetLineSize). The page size and the maximum scroll position are not changed.
  • To set the page size, use HorizontalScrollbarSetLineSize, which has the opposite mix-up. To set both values, call:
HorizontalScrollbarSetLineSize( name, pageSize )   -- sets the page size (line size becomes the old page size)
HorizontalScrollbarSetPageSize( name, lineSize )   -- sets the line size
  • The thumb is recalculated and the current position is clamped again. If that moves the position, the OnScrollPosChanged handler runs.
  • The stock UI never calls this function.
  • The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.

Errors

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

Example

See the call order in Details.

See also