Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:HorizontalScrollWindowUpdateScrollRect

From RoR Wiki

UI Lua API · ScrollWindow functions
Version: WAR 1.4.8

Measures a HorizontalScrollWindow's content again and updates its scroll range and scroll bar.

HorizontalScrollWindowUpdateScrollRect(scrollWindowName)

Arguments

scrollWindowName
string – Name of the HorizontalScrollWindow.

Returns

Nothing.

Details

  • This is the horizontal counterpart of ScrollWindowUpdateScrollRect, with two differences in how the content is measured:
    • The content width runs from the left edge of the leftmost child window to the right edge of the rightmost one. The scroll child's own position is not included.
    • Every child window with a width greater than 0 is counted, whether it is shown or not.
  • If neither the content width nor the window's own width has changed since the last measurement, nothing else happens. Otherwise the scroll bar is shown or enabled when the content is wider than the window (hidden or disabled when it is not), its range is updated, and the scroll child is resized to the content width.
  • The stock UI never calls this function.

Errors

The error messages always use the name HorizontalScrollWindowSetOffset:

  • Error in function call 'HorizontalScrollWindowSetOffset': Window %s does not exist
  • Error in function call 'HorizontalScrollWindowSetOffset': Window %s is not a HorizontalScrollWindow

Example

A minimal example built from the signature:

HorizontalScrollWindowUpdateScrollRect( "MyHScrollWindow" )

See also