<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AWindowGetShowing</id>
	<title>API:WindowGetShowing - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AWindowGetShowing"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:WindowGetShowing&amp;action=history"/>
	<updated>2026-10-17T06:31:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:WindowGetShowing&amp;diff=30883&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:WindowGetShowing&amp;diff=30883&amp;oldid=prev"/>
		<updated>2026-10-16T19:51:40Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Window|wrapper=interfacecore/source/windowstate.lua}}&lt;br /&gt;
Returns whether a window is set to be shown.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
showing = WindowGetShowing(windowName)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;windowName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the window.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;showing : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the window&amp;#039;s showing flag is set.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* This reports the window&amp;#039;s own showing flag. Its parents&amp;#039; flags are not checked.&lt;br /&gt;
* The client registers the C function as &amp;lt;code&amp;gt;_WindowGetShowing&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;WindowGetShowing&amp;lt;/code&amp;gt; that addons call is a Lua function defined in &amp;lt;code&amp;gt;interfacecore/source/windowstate.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
** If the global table named after the window (&amp;lt;code&amp;gt;_G[windowName]&amp;lt;/code&amp;gt;) has a &amp;lt;code&amp;gt;STATE&amp;lt;/code&amp;gt; table, it returns &amp;lt;code&amp;gt;STATE.SHOWING&amp;lt;/code&amp;gt; without calling into the client.&lt;br /&gt;
** Otherwise it calls &amp;lt;code&amp;gt;_WindowGetShowing(windowName)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* For windows with state tracking enabled, the client writes the new value to &amp;lt;code&amp;gt;&amp;#039;&amp;#039;windowName&amp;#039;&amp;#039;.STATE.SHOWING&amp;lt;/code&amp;gt; whenever the showing flag changes, for example through [[API:WindowSetShowing|WindowSetShowing]].&lt;br /&gt;
* If an addon creates a global table with the same name as a window and gives it a &amp;lt;code&amp;gt;STATE&amp;lt;/code&amp;gt; field, &amp;lt;code&amp;gt;WindowGetShowing&amp;lt;/code&amp;gt; returns whatever that field holds. Avoid using &amp;lt;code&amp;gt;STATE&amp;lt;/code&amp;gt; as a field name on window tables.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;WindowGetShowing&amp;#039;: Window %s does not exist&amp;lt;/code&amp;gt; (from &amp;lt;code&amp;gt;_WindowGetShowing&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;easystem_eventtext/source/system_eventtext.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( DoesWindowExist( &amp;quot;LoadingWindow&amp;quot; ) and WindowGetShowing( &amp;quot;LoadingWindow&amp;quot; ) ) then&lt;br /&gt;
    -- the loading screen is up&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:WindowSetShowing|WindowSetShowing]]&lt;br /&gt;
* [[API:DoesWindowExist|DoesWindowExist]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>