|
Engine²
Open-source game engine written in C++.
|
Typedefs | |
| using | JoystickAxes = std::vector<float> |
| using | JoystickButtons = std::vector<unsigned char> |
Functions | |
| bool | IsKeyPressed (int key) noexcept |
| Check if a key is pressed. | |
| bool | IsMouseButtonPressed (int button) noexcept |
| Check if a mouse button is pressed. | |
| glm::vec2 | GetMousePosition () noexcept |
| Get the current mouse position. | |
| void | PrintAvailableControllers () noexcept |
| Prints the available controllers that glfw can handle. | |
| bool | IsJoystickPresent (int jid) noexcept |
| Check if a joystick is present. | |
| std::string | GetJoystickName (int jid) noexcept |
| Get the name of a joystick. | |
| JoystickAxes | GetJoystickAxes (int jid) |
| Get the joystick axis values. | |
| JoystickButtons | GetJoystickButtons (int jid) |
| Get the joystick button states. | |
| using Input::Utils::JoystickAxes = std::vector<float> |
| using Input::Utils::JoystickButtons = std::vector<unsigned char> |
| Input::Utils::JoystickAxes Input::Utils::GetJoystickAxes | ( | int | jid | ) |
Get the joystick axis values.
| jid | The joystick ID (GLFW_JOYSTICK_1, GLFW_JOYSTICK_2, etc.) |
| InputError | if the joystick is not present or if there is an error retrieving the axes. |
| Input::Utils::JoystickButtons Input::Utils::GetJoystickButtons | ( | int | jid | ) |
Get the joystick button states.
| jid | The joystick ID (GLFW_JOYSTICK_1, GLFW_JOYSTICK_2, etc.) |
| InputError | if the joystick is not present or if there is an error retrieving the buttons. |
|
inlinenoexcept |
Get the name of a joystick.
| jid | The joystick ID (GLFW_JOYSTICK_1, GLFW_JOYSTICK_2, etc.) |
|
inlinenoexcept |
Get the current mouse position.
|
inlinenoexcept |
Check if a joystick is present.
| jid | The joystick ID (GLFW_JOYSTICK_1, GLFW_JOYSTICK_2, etc.) |
|
inlinenoexcept |
Check if a key is pressed.
| key | The key to check. (Use GLFW_KEY_* constants) |
|
inlinenoexcept |
Check if a mouse button is pressed.
| button | The mouse button to check. (Use GLFW_MOUSE_BUTTON_* constants) |
|
noexcept |
Prints the available controllers that glfw can handle.