<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
	<func>
		<title>GuiClose</title>
		<category>GUI</category>
		<version>7.0 OC</version>
		<syntax>
			<rtype>bool</rtype>
			<params>
				<param>
					<type>int</type>
					<name>gui_id</name>
					<desc>The ID of the gui window that was returned by <funclink>GuiOpen</funclink>().</desc>
				</param>
				<param>
					<type>int</type>
					<name>child_id</name>
					<desc>Optional. If given, the sub-window of the gui_id window with the matching child_id will be closed. Should be used together with the parameter target.</desc>
				</param>
				<param>
					<type>object</type>
					<name>target</name>
					<desc>Optional. Should be used together with child_id. The target of the sub-window that will be closed.</desc>
				</param>
			</params>
		</syntax>
		<desc>Closes an existing GUI window, that has previously been opened with <funclink>GuiOpen</funclink>(). It is possible to close only one certain sub-window by passing child_id and target. Returns true if a window was closed.</desc>
		<remark>See the <emlink href="script/GUI.html">GUI documentation</emlink> for further explanations.</remark>
		<examples>
			<example>
<code>
var menu =
{
	left_part = 
	{
		Right = "50%",
		ID = 1,
		BackgroundColor = <funclink>RGB</funclink>(255, 0, 0)
	},
	right_part = 
	{
		Left = "50%",
		ID = 2,
		BackgroundColor = <funclink>RGB</funclink>(0, 255, 0)
	}
};
var menuID = <funclink>GuiOpen</funclink>(menu);
GuiClose(menuID, 2, nil);
</code>
				<text>Opens a menu window consisting of two parts and then closes the right half.</text>
			</example>
		</examples>
		<related><emlink href="script/GUI.html">GUI Documentation</emlink><funclink>GuiAction_Call</funclink><funclink>GuiAction_SetTag</funclink><funclink>GuiOpen</funclink><funclink>GuiUpdate</funclink><funclink>GuiUpdateTag</funclink></related>
	</func>
	<author>Zapper</author><date>2014-10</date>
</funcs>
