API:HorizontalScrollbarSetPageSize
From RoR Wiki
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:
sizebecomes 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
OnScrollPosChangedhandler 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 existError in function call 'HorizontalScrollbarSetPageSize': Window %s is not a HorizontalScrollbar
Example
See the call order in Details.
