Squirrel/Client/Functions/Controls/ShowMouseCursor

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Updated related functions)
(Added example)
 
Line 12: Line 12:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
+
This code shows the mouse when the player uses the command '/mouse'
Explanation for the example
+
  
 
<code lang="squirrel">
 
<code lang="squirrel">
-- Todo
+
function onClientCommand(cmd, text)
 +
{
 +
    if(cmd == "mouse")
 +
    {
 +
        ShowMouseCursor( true );
 +
    }
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
-- List of used functions and other notes here.
+
The event [[Squirrel/Client/Events/Player/onClientCommand|onClientCommand]] was used in this example. More information is available on the corresponding page.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Client/Functions/Controls}}
 
{{Squirrel/Client/Functions/Controls}}

Latest revision as of 22:52, 2 August 2011

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

This function sets the mouse cursor to show/hide

[edit] Syntax

  1. ShowMouseCursor( bool b )

[edit] Arguments

  • b - A boolean value stating if the mouse cursor should be shown

[edit] Example

This code shows the mouse when the player uses the command '/mouse'

  1.  
  2. function onClientCommand(cmd, text)
  3. {
  4. if(cmd == "mouse")
  5. {
  6. ShowMouseCursor( true );
  7. }
  8. }
  9.  

[edit] Notes

The event onClientCommand was used in this example. More information is available on the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox