Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WindowGetParent

From RoR Wiki
Revision as of 19:51, 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 · 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) ) )

See also