- Source
Members
(static, readonly) BUTTON :number
Enum for mouse buttons.
Type:
Properties- number
Name | Type | Description |
---|---|---|
LEFT | number | Left mouse button. |
LEFT | number | |
MIDDLE | number | |
RIGHT | number |
- Source
Methods
(static) GetPosition() → {Vector2}
Get the current mouse position.
- Source
Returns:
The current mouse position.
- Type:
- Vector2
(static) IsButtonDown(button) → {boolean}
Check if a button is currently down.
Parameters:
Name | Type | Description |
---|---|---|
button | MouseInput. | The button to check. Use MouseInput.buttons enum. |
- Source
Returns:
True if the specified button is down.
- Type:
- boolean
(static) IsButtonUp(button) → {boolean}
Check if a button is currently up.
Parameters:
Name | Type | Description |
---|---|---|
button | MouseInput. | The button to check. Use MouseInput.buttons enum. |
- Source
Returns:
True if the specified button is up.
- Type:
- boolean
(static) IsClicked(button) → {boolean}
Check if a button was clicked.
Parameters:
Name | Type | Description |
---|---|---|
button | MouseInput. | The button to check. Use MouseInput.buttons enum. |
- Source
Returns:
True if the specified button was clicked.
- Type:
- boolean