-
Notifications
You must be signed in to change notification settings - Fork 1
Mouse
Tony Nguyen edited this page May 11, 2020
·
5 revisions
Mouse Object Class allows for mouse functionality, this is not a limited object which means you can have an infinite amount of this object per world. Represents the mouse of a player.
| Index | Type | Description | Edit Mode |
|---|---|---|---|
| Confined | Boolean | Determines whether or not the mouse will be stuck inside the window | Read+Write |
| Visible | Boolean | Determines whether or not the cursor will be visible inside the window | Read+Write |
| Hit | Vector | Shows the position of the mouse inside the window | Read |
| Target | Data Object | References to an object that the mouse is pointed at. WIP | Read |
| Parameter | Type | Optional | Description |
|---|---|---|---|
| x | Number | No | x position that the mouse should move to |
| y | Number | No | y position that the mouse should move to |
Moves the mouse position to any x and y position within the window
Returns: None
| Argument | Type | Description |
|---|---|---|
| x | Number | x position of the mouse |
| y | Number | y position of the mouse |
| dx | Number | Velocity of the x position of the mouse |
| dy | Number | Velocity of the y position of the mouse |
Triggers when the mouse is being moved
| Argument | Type | Description |
|---|---|---|
| x | Number | x position of the mouse |
| y | Number | y position of the mouse |
Triggers when the mouse is being idle
| Argument | Type | Description |
|---|---|---|
| x | Number | Direction of the scroll wheel on the x-axis |
| y | Number | Direction of the scroll wheel on the y-axis |
Triggers when the scroll wheel is being moved up, down, left, or right.
| Argument | Type | Description |
|---|---|---|
| x | Number | x position of the mouse |
| y | Number | y position of the mouse |
| button | Number | Corresponding mouse button number that was pressed |
| presses | Number | How many times the same button has been pressed consecutively |
Triggers when a mouse button is being pressed
| Argument | Type | Description |
|---|---|---|
| x | Number | x position of the mouse |
| y | Number | y position of the mouse |
| button | Number | Corresponding mouse button number that was pressed |
| presses | Number | How many times the same button has been pressed consecutively |
Triggers when a mouse button is being released
Work in progress wiki!!