gui.MousePos
From GMod Wiki
Function | |
Syntax |
gui.MousePos( ) Where is this used? |
Description: | |
Returns the mouse's position on the screen (Mouse's ScreenPos()) | |
Returns: | Number X, Number Y |
Part of Library: | gui |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Gui.MousePos]Gui.MousePos [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Prints the mouse position in the console. |
---|---|
Used on | |
Code | local x, y = gui.MousePos() print( x, y ) |
Output | N/A |
Additional Notes
- The co-ordinates returned are relative to the top-left of the screen (or window if you're playing in windowed mode).