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. * This function returns the global position of the mouse cursor on the desktop. *

getPosition
Vector2i getPosition(const(Window) relativeTo)

Get the current position of the mouse in window coordinates. * This function returns the current position of the mouse cursor, relative to the given window. *

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. * This function sets the global position of the mouse cursor on the desktop. *

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

Set the current position of the mouse in window coordinates. * This function sets the current position of the mouse cursor, relative to the given window. *

Meta