API:WindowGetShowing
From RoR Wiki
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–trueif 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. TheWindowGetShowingthat addons call is a Lua function defined ininterfacecore/source/windowstate.lua:- If the global table named after the window (
_G[windowName]) has aSTATEtable, it returnsSTATE.SHOWINGwithout calling into the client. - Otherwise it calls
_WindowGetShowing(windowName).
- If the global table named after the window (
- For windows with state tracking enabled, the client writes the new value to
windowName.STATE.SHOWINGwhenever 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
STATEfield,WindowGetShowingreturns whatever that field holds. Avoid usingSTATEas 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
