The static class that handles input data from the mouse and touchscreen.
Members
-
The time of the last input in milliseconds.
-
The interval of the pseudo key repeat in frames.
-
The wait time of the pseudo key repeat in frames.
-
The threshold number of pixels to treat as moved.
-
The horizontal scroll amount.
-
The vertical scroll amount.
-
The x coordinate on the canvas area of the latest touch event.
-
The y coordinate on the canvas area of the latest touch event.
Methods
-
Clears all the touch data.
-
Initializes the touch system.
-
Checks whether the right mouse button is just pressed.
Returns:
Type Description boolean True if the right mouse button is just pressed. -
Checks whether the mouse button or touchscreen has been pressed and released at the same position.
Returns:
Type Description boolean True if the mouse button or touchscreen is clicked. -
Checks whether the mouse is moved without pressing a button.
Returns:
Type Description boolean True if the mouse is hovered. -
Checks whether the left mouse button or touchscreen is kept depressed.
Returns:
Type Description boolean True if the left mouse button or touchscreen is long-pressed. -
Checks whether the mouse or a finger on the touchscreen is moved.
Returns:
Type Description boolean True if the mouse or a finger on the touchscreen is moved. -
Checks whether the mouse button or touchscreen is currently pressed down.
Returns:
Type Description boolean True if the mouse button or touchscreen is pressed. -
Checks whether the left mouse button or touchscreen is released.
Returns:
Type Description boolean True if the mouse button or touchscreen is released. -
Checks whether the left mouse button or touchscreen is just pressed or a pseudo key repeat occurred.
Returns:
Type Description boolean True if the mouse button or touchscreen is repeated. -
Checks whether the left mouse button or touchscreen is just pressed.
Returns:
Type Description boolean True if the mouse button or touchscreen is triggered. -
Updates the touch data.