Mouse

The mouse input source which acculmulates mouse information

Constructors

this
this()

Makes a mouse and initializes all of the buttons

Members

Functions

handleEvent
void handleEvent(SDL_Event event)

Acculmulates all of the mouse events and updates stored pressables accordingly

Properties

allPressables
Pressable!uint[uint] allPressables [@property getter]

Returns all of the mouse buttons

cursor
Cursor cursor [@property setter]

Sets the cursor of the mouse

cursor
Cursor cursor [@property getter]

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
iVector location [@property getter]

Gets the mouse location accounting for logical size or viewport This should be what is most regularly used

screenLocation
iVector screenLocation [@property setter]

Sets the location of the mouse globally

screenLocation
iVector screenLocation [@property getter]

Gets the location of the mouse globally

totalWheelDisplacement
iVector totalWheelDisplacement [@property getter]

Gets by how much the mouse wheel has been displaced Records changes in wheel from the start of mouse construction

windowLocation
iVector windowLocation [@property setter]

Sets the location of the mouse relative to the window

windowLocation
iVector windowLocation [@property getter]

Gets the location of the mouse

Meta