API:WindowGetParent
From RoR Wiki
UI Lua API · Window functions
Version: WAR 1.4.8
Returns the name of a window's parent.
parentName = WindowGetParent(windowName)
Arguments
- windowName
string– Name of the window.
Returns
- parentName
string– Name of the parent window. An empty string for a window without a parent, such as"Root".
Details
- Top-level windows have
"Root"as their parent. - The error message is missing the closing quote after the function name (see Errors).
Errors
Error in function call 'WindowGetParent: Window %s does not exist
Example
Walking up from a clicked button to its dialog, from easystem_dialogmanager/source/dialogmanager.lua:
local dlgIndex = WindowGetId( WindowGetParent( WindowGetParent(SystemData.ActiveWindow.name) ) )
