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

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.

Section: Element methods

Categories: Client functions | Element methods