InputHandler

Input handler. Handle mouse movements and mouse buttons / keys states.

Constructors

this
this(Game game)

InputHandler constructor.

Members

Functions

dispose
void dispose()

InputHandler destructor.

isKeyPressed
bool isKeyPressed(Key key)

Checks if a specific key is pressed.

isMouseButtonClicked
bool isMouseButtonClicked(MouseButton button)

Checks if a specific mouse button is clicked.

onMouseClick
void onMouseClick(GLFWwindow* window, int button, int action, int dunno)

Event called on mouse button click action.

onMouseMove
void onMouseMove(GLFWwindow* window, double x, double y)

Event called on mouse movement.

update
void update()

Updates input states and triggers events.

Properties

mousePosition
const(vec2) mousePosition [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta