Difference between revisions of "Legacy:GetMouseX"
From Spherical
(Created page with "{{subst:functemp}}") |
|||
Line 1: | Line 1: | ||
− | + | Returns the X coordinate of the pixel the mouse is currently over in the game window or (in fullscreen) screen. | |
__TOC__ | __TOC__ | ||
==Usage== | ==Usage== | ||
− | {{Usage|returns= | + | {{Usage|returns=X|func=GetMouseX}} |
− | + | ==Examples== | |
− | + | Color the pixel on the screen that the mouse is currently on: | |
− | |||
− | = | + | <syntaxhighlight> |
− | ( | + | var Red = CreateColor(255, 0, 0, 255); |
+ | Point(GetMouseX(), GetMouseY(), Red); | ||
+ | </syntaxhighlight> | ||
==Notes== | ==Notes== | ||
− | + | Mouse coordinates will not be tracked when the mouse is out of the window. | |
==See also== | ==See also== | ||
− | + | ||
− | + | * [[API:GetMouseY|GetMouseY]]() | |
− | * | + | * [[API:SetMousePosition|SetMousePosition]](x, y) |
− | * |
Revision as of 12:25, 8 September 2013
Returns the X coordinate of the pixel the mouse is currently over in the game window or (in fullscreen) screen.
Contents
Usage
X 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
- GetMouseY()
- SetMousePosition(x, y)