Mouse X

Gets the mouse cursor's x co-ordinate.

Syntax

coord = Mouse X

Description

Returns the x co-ordinate of the mouse cursor.

coord is the x position of the mouse.

This function uses the main canvas' position to calculate its offset, so if the canvas is smaller than the screen the mouse position (0,0) will actually be the top left of the canvas, not the top left of the screen.

This also means it is posible for this function to return numbers that are negative or larger than the canvas width.


Table of contents