Squirrel/Client/Events/GUI/onClientClickButton
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|onClientClickButton}} This event is called when the local player clicks a button. == Syntax == <code>function onClientClickButton( button )</code> === Argumen…') |
|||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
− | + | This code will hide a button after it has been pressed. | |
− | + | ||
<code lang="squirrel"> | <code lang="squirrel"> | ||
− | + | function onClientClickButton( button ) | |
+ | { | ||
+ | button.Visible = false; | ||
+ | } | ||
</code> | </code> | ||
=== Notes === | === Notes === | ||
− | + | This example uses the [[Squirrel/Client/Functions/GUIButton/Visible|GUIButton.Visible]] function. More info on its corresponding page. | |
== Related Events == | == Related Events == | ||
{{Squirrel/Client/Events/GUI}} | {{Squirrel/Client/Events/GUI}} |
Latest revision as of 02:44, 2 August 2011
This event is called when the local player clicks a button.
[edit] Syntax
function onClientClickButton( button )
[edit] Arguments
- button - The pointer of the button clicked
[edit] Example
This code will hide a button after it has been pressed.
function onClientClickButton( button ) { button.Visible = false; }
[edit] Notes
This example uses the GUIButton.Visible function. More info on its corresponding page.
[edit] Related Events
- onClientClickButton
- onClientClickCheckbox