retro-engine / Exports / MouseState
Class for handling mouse input.
The map of mouse button states.
▪ Static Private btns: Map<number, boolean>
The position of the mouse on the screen, relative to the top-left corner.
▪ Static screen_pos: Object
| Name | Type |
|---|---|
x |
number |
y |
number |
The position of the mouse in the world.
▪ Static world_pos: Object
| Name | Type |
|---|---|
x |
number |
y |
number |
Checks if a mouse button is currently pressed.
▸ Static isPressed(btn): boolean
| Name | Type |
|---|---|
btn |
number |
boolean