Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LCDGetSize

From RoR Wiki
Revision as of 19:46, 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 · LCD functions
Version: WAR 1.4.8

Returns the size of an element on an LCD page.

width, height = LCDGetSize(pageName, elementName)

Arguments

pageName
string – Name of the page.
elementName
string – Name of an element on that page.

Returns

width
number – Width in pixels.
height
number – Height in pixels.

Details

  • If the page or element does not exist, an error below is logged and nothing is returned.
  • The errors name LCDSetSize, not LCDGetSize: the client uses that name for the element lookup.
  • The function needs at least two arguments and only reads the last two.
  • The stock UI never calls this function.

Errors

  • Error in function call 'LCDSetSize': Page '%s' does not exist.
  • Error in function call 'LCDSetSize': Page '%s' does not have a child named '%s'.

Example

A minimal example built from the signature:

local width, height = LCDGetSize( "MyPage", "Logo" )

See also