Difference between revisions of "Legacy:GetMouseX"

From Spherical
Jump to: navigation, search
Line 6: Line 6:
  
 
==Usage==
 
==Usage==
{{Usage|returns=X|func=GetMouseX}}
+
{{Usage|returns=number|func=GetMouseX}}
  
 
==Examples==
 
==Examples==

Revision as of 12:26, 8 September 2013


Returns the X coordinate of the pixel the mouse is currently over in the game window or (in fullscreen) screen.

Usage

number GetMouseX();


Examples

Color the pixel on the screen that the mouse is currently on:

var Red = CreateColor(255, 0, 0, 255);
Point(GetMouseX(), GetMouseY(), Red);

Notes

Mouse coordinates will not be tracked when the mouse is out of the window.

See also