Class Mouse
The mouse input source which acculmulates mouse information
Constructors
Name | Description |
this
|
Makes a mouse and initializes all of the buttons
|
Properties
Name | Type | Description |
allPressables [get]
|
Pressable!(uint)[uint] | Returns all of the mouse buttons
|
cursor [set]
|
Cursor | Sets the cursor of the mouse
|
cursor [get]
|
Cursor | Gets the cursor of the mouse
Special precautions must be taken when using this method:
Make sure to store the output of the cursor or make sure the cursor doesn't get GCed
Because the actual cursor is being used in C, D will think this returned cursor won't be being used and destroy it
It is probably better to avoid this method entirely
|
location [get]
|
Vector!(int,2) | Gets the mouse location accounting for logical size or viewport
This should be what is most regularly used
|
screenLocation [set]
|
Vector!(int,2) | Sets the location of the mouse globally
|
screenLocation [get]
|
Vector!(int,2) | Gets the location of the mouse globally
|
totalWheelDisplacement [get]
|
Vector!(int,2) | Gets by how much the mouse wheel has been displaced
Records changes in wheel from the start of mouse construction
|
windowLocation [set]
|
Vector!(int,2) | Sets the location of the mouse relative to the window
|
windowLocation [get]
|
Vector!(int,2) | Gets the location of the mouse
|
allPressables [get]
|
Pressable!T[T] | Return a list of all of the pressables that can be accessed by the template type
|
Methods
Name | Description |
handleEvent
|
Acculmulates all of the mouse events and updates stored pressables accordingly
|
getPressedPressables
|
Returns a list of all of the pressables that are held down.
|
Aliases
Name | Description |
allButtons
|
Allows allPressables to be called as allButtons
|