#include <Input.h>
|
| static auto | keyCallback (GLFWwindow *window, int pressedKey, int scancode, int action, int mods) -> void |
| | Registers which keys are pressed.
|
| static auto | mouseButtonCallback (GLFWwindow *window, int pressedButton, int action, int mods) -> void |
| | Registers which mouse buttons are pressed.
|
| static auto | sendKeyPressedMessage (unsigned int GLFWKey) -> void |
| | Helper function that creates and broadcasts a message of a key being pressed.
|
|
| std::unordered_map< int, std::string > | inputMap |
| | A map that takes GLFW key codes and maps them to input event names.
|
| bool | enabled |
| | If this is off, we don't do anything on key press.
|
| Vector4D | mouseWorldCoords = {0.f, 0.f, 0.f, 1.f} |
◆ Keys()
◆ getEnabled()
| auto Keys::getEnabled |
( |
| ) |
const->bool |
◆ getInputMap()
| auto Keys::getInputMap |
( |
| ) |
const->conststd::unordered_map< int, std::string > & |
◆ getMousePosition()
| auto Keys::getMousePosition |
( |
| ) |
const->std::pair< float, float > |
◆ getMouseWorldCoords()
| auto Keys::getMouseWorldCoords |
( |
| ) |
const->constVector4D & |
◆ keyCallback()
| auto Keys::keyCallback |
( |
GLFWwindow * | window, |
|
|
int | pressedKey, |
|
|
int | scancode, |
|
|
int | action, |
|
|
int | mods )->void |
|
static |
Registers which keys are pressed.
◆ mouseButtonCallback()
| auto Keys::mouseButtonCallback |
( |
GLFWwindow * | window, |
|
|
int | pressedButton, |
|
|
int | action, |
|
|
int | mods )->void |
|
static |
Registers which mouse buttons are pressed.
◆ sendKeyPressedMessage()
| auto Keys::sendKeyPressedMessage |
( |
unsigned int | GLFWKey | ) |
->void |
|
static |
Helper function that creates and broadcasts a message of a key being pressed.
- Todo
- : Add proper logging for this
◆ setEnabled()
| auto Keys::setEnabled |
( |
bool | newState | ) |
->void |
◆ setImGuiMouseWorldCoords()
| auto Keys::setImGuiMouseWorldCoords |
( |
Vector4D & | pos | ) |
->void |
|
private |
◆ setMouseWorldCoords()
| auto Keys::setMouseWorldCoords |
( |
const Vector4D & | coords | ) |
->void |
|
private |
◆ showMenu()
| auto Keys::showMenu |
( |
| ) |
->void |
◆ update()
| auto Keys::update |
( |
float | dt | ) |
->void |
◆ enabled
If this is off, we don't do anything on key press.
◆ inputMap
| std::unordered_map<int, std::string> Keys::inputMap |
|
private |
A map that takes GLFW key codes and maps them to input event names.
◆ mouseWorldCoords
| Vector4D Keys::mouseWorldCoords = {0.f, 0.f, 0.f, 1.f} |
|
private |
The documentation for this class was generated from the following files:
- /home/egrazil/sites/Brunot/The House/source/System/Input.h
- /home/egrazil/sites/Brunot/The House/source/System/Input.cpp