9.10 Mouse object
Description
You can get/set the position of the mouse cursor via the Mouse object. The cursor position is relative to the upper left corner of the game window. If the game is in window mode the coordinates will be transformed automatically.
List of methods/properties
Name | Type | Short description |
X | Property | The current x coordinate of the mouse cursor |
Y | Property | The current y coordinate of the mouse cursor |
Description
This property represents the x coordinate of the mouse cursor and is relative to the upper left corner of the game window. If the game window is stretched then the x coordinate will be transformed automatically. The unit for this value is pixel.
Syntax
Data type
Dword
Type
Property
Example
At the end the x coordinate of the mouse cursor whould be 10 pixel away from the left border of the game window.
Description
This property represents the y coordinate of the mouse cursor and is relative to the upper left corner of the game window. If the game window is stretched then the y coordinate will be transformet automatically. The unit for this value is pixel.
Syntax
Data type
Dword
Type
Property
Example
At the end v[1] whould be the current y coordinate relative to the upper border of the game window.