Class in reactor_core_io.js
TouchInput
16 public functions in 4 groups · show internal (_) functions
Familiar territory. TouchInput keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.
The static class that handles input data from the mouse and touchscreen.
function TouchInput()
Quick Reference
Setup & Creation 1
| initialize() | Initializes the touch system. |
Checks (True / False) 13
| isClicked() | Checks whether the mouse button or touchscreen has been pressed and released at the same position. |
| isPressed() | Checks whether the mouse button or touchscreen is currently pressed down. |
| isTriggered() | Checks whether the left mouse button or touchscreen is just pressed. |
| isRepeated() | Checks whether the left mouse button or touchscreen is just pressed or a pseudo key repeat occurred. |
| isLongPressed() | Checks whether the left mouse button or touchscreen is kept depressed. |
| isMouseButtonPressed() | Checks the independent state of a mouse button. |
| isMouseButtonTriggered() | Whether it is mouse button triggered. |
| isMouseButtonReleased() | Whether it is mouse button released. |
| isMouseButtonLongPressed() | Whether it is mouse button long pressed. |
| isCancelled() | Checks whether the right mouse button is just pressed. |
| isMoved() | Checks whether the mouse or a finger on the touchscreen is moved. |
| isHovered() | Checks whether the mouse is moved without pressing a button. |
| isReleased() | Checks whether the left mouse button or touchscreen is released. |
Actions 1
| clear() | Clears all the touch data. |
Updating & Drawing 1
| update() | Updates the touch data. |
Setup & Creation
initialize
static sourceTouchInput.initialize()
Initializes the touch system.
Checks (True / False)
isClicked
static sourceTouchInput.isClicked()
Checks whether the mouse button or touchscreen has been pressed and released at the same position.
Details
Checks whether the mouse button or touchscreen has been pressed and released at the same position.
isPressed
static sourceTouchInput.isPressed()
Checks whether the mouse button or touchscreen is currently pressed down.
Details
Checks whether the mouse button or touchscreen is currently pressed down.
isTriggered
static sourceTouchInput.isTriggered()
Checks whether the left mouse button or touchscreen is just pressed.
Details
Checks whether the left mouse button or touchscreen is just pressed.
isRepeated
static sourceTouchInput.isRepeated()
Checks whether the left mouse button or touchscreen is just pressed or a pseudo key repeat occurred.
Details
Checks whether the left mouse button or touchscreen is just pressed or a pseudo key repeat occurred.
isLongPressed
static sourceTouchInput.isLongPressed()
Checks whether the left mouse button or touchscreen is kept depressed.
Details
Checks whether the left mouse button or touchscreen is kept depressed.
isMouseButtonPressed
static sourceTouchInput.isMouseButtonPressed(button)
Checks the independent state of a mouse button.
Details
Checks the independent state of a mouse button.
isMouseButtonTriggered
static sourceTouchInput.isMouseButtonTriggered(button)
Whether it is mouse button triggered. (Same as the RPG Maker MZ method of this name.)
isMouseButtonReleased
static sourceTouchInput.isMouseButtonReleased(button)
Whether it is mouse button released. (Same as the RPG Maker MZ method of this name.)
isMouseButtonLongPressed
static sourceTouchInput.isMouseButtonLongPressed(button)
Whether it is mouse button long pressed. (Same as the RPG Maker MZ method of this name.)
isCancelled
static sourceTouchInput.isCancelled()
Checks whether the right mouse button is just pressed.
Details
Checks whether the right mouse button is just pressed.
isMoved
static sourceTouchInput.isMoved()
Checks whether the mouse or a finger on the touchscreen is moved.
Details
Checks whether the mouse or a finger on the touchscreen is moved.
isHovered
static sourceTouchInput.isHovered()
Checks whether the mouse is moved without pressing a button.
Details
Checks whether the mouse is moved without pressing a button.
isReleased
static sourceTouchInput.isReleased()
Checks whether the left mouse button or touchscreen is released.
Details
Checks whether the left mouse button or touchscreen is released.
Actions
clear
static sourceTouchInput.clear()
Clears all the touch data.
Updating & Drawing
update
static sourceTouchInput.update()
Updates the touch data.