forked from Mirrors/openclonk
57 lines
1.9 KiB
XML
57 lines
1.9 KiB
XML
<?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>GuiAction_Call</title>
|
|
<category>GUI</category>
|
|
<version>7.0 OC</version>
|
|
<syntax>
|
|
<rtype>array</rtype>
|
|
<params>
|
|
<param>
|
|
<type>proplist</type>
|
|
<name>target</name>
|
|
<desc>The target object or definition that the callback will be called on.</desc>
|
|
</param>
|
|
<param>
|
|
<type>string</type>
|
|
<name>function</name>
|
|
<desc>The name of the function that will be called.</desc>
|
|
</param>
|
|
<param>
|
|
<type>any</type>
|
|
<name>value</name>
|
|
<desc>A custom parameter value that will be passed to your function. If you need more custom values, use an array or a proplist.</desc>
|
|
</param>
|
|
</params>
|
|
</syntax>
|
|
<desc>Action for a GUI window event such as OnClick. The function that will be called will get the "value" parameter as the first parameter. Additional parameters are: player, gui_id, subwindow_id, target. </desc>
|
|
<remark>See the <emlink href="script/GUI.html">GUI documentation</emlink> for further explanations.</remark>
|
|
<examples>
|
|
<example>
|
|
<code>
|
|
func Initialize()
|
|
{
|
|
var menu =
|
|
{
|
|
BackgroundColor = <funclink>RGB</funclink>(255, 0, 0),
|
|
OnClick = <funclink>GuiAction_Call</funclink>(this, "DoTheScream", nil)
|
|
};
|
|
var menuID = <funclink>GuiOpen</funclink>(menu);
|
|
}
|
|
|
|
func DoTheScream(data, int player, int gui_id, int subwindow_id, object target)
|
|
{
|
|
Sound("Scream");
|
|
}
|
|
</code>
|
|
<text>Defines a new GUI window that screams when you click it. This could be a scenario script.</text>
|
|
</example>
|
|
</examples>
|
|
<related><emlink href="script/GUI.html">GUI Documentation</emlink><funclink>GuiAction_SetTag</funclink><funclink>GuiClose</funclink><funclink>GuiOpen</funclink><funclink>GuiUpdate</funclink><funclink>GuiUpdateTag</funclink></related>
|
|
</func>
|
|
<author>Zapper</author><date>2014-10</date>
|
|
</funcs>
|