Class Input

Class Documentation

class Input

Input state management singleton.

Public Functions

glm::dvec2 GetCursorPos()

Get the current cursor position.

Returns:

The current cursor position

bool IsKeyPressed(unsigned int key)

Check whether a given key is pressed.

Note

View the page “Input Mappings” in the manual for the list of valid keys

Parameters:

key – The key to check.

Returns:

If the key is pressed

bool IsMouseButtonPressed(unsigned int button)

Check whether a given mouse button is pressed.

Note

View the page “Input Mappings” in the manual for the list of valid buttons

Parameters:

button – The mouse button to check.

Returns:

If the mouse button is pressed

Public Static Functions

static Input &Get()

Get the instance and create one if there isn’t one.

Returns:

The instance