Squirrel/Client/Events/GUI/onClientClickButton

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(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 ==
  
Some explanation here
+
This code will hide a button after it has been pressed.
{{Squirrel/NeedsExample}}
+
  
 
<code lang="squirrel">
 
<code lang="squirrel">
-- todo
+
function onClientClickButton( button )
 +
{
 +
    button.Visible = false;
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
-- List of used functions and other notes here.
+
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

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This event is called when the local player clicks a button.

[edit] Syntax

  1. 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.

  1.  
  2. function onClientClickButton( button )
  3. {
  4. button.Visible = false;
  5. }
  6.  

[edit] Notes

This example uses the GUIButton.Visible function. More info on its corresponding page.

[edit] Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox