API:LCDGetSize
From RoR Wiki
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, notLCDGetSize: 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" )
