Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:HorizontalScrollbarSetLineSize

From RoR Wiki

UI Lua API · Scrollbar functions
Version: WAR 1.4.8

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

HorizontalScrollbarSetLineSize(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 page size (returned by HorizontalScrollbarGetPageSize).
    • The line size is set to the page size the scrollbar had before the call.
    • If size is larger than the maximum scroll position, the maximum is raised to size.
  • To set the line size, use HorizontalScrollbarSetPageSize, which has the opposite mix-up. See that page for a call order that sets both values.
  • 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 'HorizontalScrollbarSetLineSize': Window %s does not exist
  • Error in function call 'HorizontalScrollbarSetLineSize': Window %s is not a HorizontalScrollbar

Example

See HorizontalScrollbarSetPageSize.

See also