Mouse

Give access to the real-time state of the mouse.

Members

Enums

Button
enum Button

Mouse buttons.

Wheel
enum Wheel

Mouse wheels.

Static functions

getPosition
Vector2i getPosition()

Get the current position of the mouse in desktop coordinates.

getPosition
Vector2i getPosition(const(Window) relativeTo)

Get the current position of the mouse in window coordinates.

isButtonPressed
bool isButtonPressed(Button button)

Check if a mouse button is pressed.

setPosition
void setPosition(Vector2i position)

Set the current position of the mouse in desktop coordinates.

setPosition
void setPosition(Vector2i position, const(Window) relativeTo)

Set the current position of the mouse in window coordinates.

Meta