Scripting/Client/GUI/button.SetCallbackFunc
Called when the button is clicked, with no arguments. callback is a global function name (string) or a function value.
Syntax
button.SetCallbackFunc(callback)Arguments
- string callback – Called when the button is clicked, with no arguments.
callbackis a global function name (string) or a function value.
Example
function onScriptLoad()
{
// button is a button handle (see Element methods)
button.SetCallbackFunc( "myFunction" );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: Element methods
Categories: Client functions | Element methods