Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WindowGetShowing

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
Defined in Lua: interfacecore/source/windowstate.lua

Returns whether a window is set to be shown.

showing = WindowGetShowing(windowName)

Arguments

windowName
string – Name of the window.

Returns

showing
boolean – true if the window's showing flag is set.

Details

  • This reports the window's own showing flag. Its parents' flags are not checked.
  • The client registers the C function as _WindowGetShowing. The WindowGetShowing that addons call is a Lua function defined in interfacecore/source/windowstate.lua:
    • If the global table named after the window (_G[windowName]) has a STATE table, it returns STATE.SHOWING without calling into the client.
    • Otherwise it calls _WindowGetShowing(windowName).
  • For windows with state tracking enabled, the client writes the new value to windowName.STATE.SHOWING whenever the showing flag changes, for example through WindowSetShowing.
  • If an addon creates a global table with the same name as a window and gives it a STATE field, WindowGetShowing returns whatever that field holds. Avoid using STATE as a field name on window tables.

Errors

  • Error in function call 'WindowGetShowing': Window %s does not exist (from _WindowGetShowing)

Example

From easystem_eventtext/source/system_eventtext.lua:

if( DoesWindowExist( "LoadingWindow" ) and WindowGetShowing( "LoadingWindow" ) ) then
    -- the loading screen is up
end

See also