1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
<?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>
|