Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:VerticalScrollbarSetPageSize

From RoR Wiki
Revision as of 19:51, 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 VerticalScrollbar. In the current client it sets the line size instead. See Details.

VerticalScrollbarSetPageSize(scrollbarName, size)

Arguments

scrollbarName
string – Name of the VerticalScrollbar.
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 VerticalScrollbarGetLineSize). The page size and the maximum scroll position are not changed.
  • To set the page size, use VerticalScrollbarSetLineSize, which has the opposite mix-up. To set both values, call:
VerticalScrollbarSetLineSize( name, pageSize )   -- sets the page size (line size becomes the old page size)
VerticalScrollbarSetPageSize( 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 'VerticalScrollbarSetPageSize': Window %s does not exist
  • Error in function call 'VerticalScrollbarSetPageSize': Window %s is not a VerticalScrollbar

Example

See the call order in Details.

See also