* Add a key event * @param state true = pressed, false = released * @param charcode the keycode of the key central to the event */
| 82 | * @param charcode the keycode of the key central to the event |
| 83 | */ |
| 84 | void InputManager::SDL_key(bool state, int charcode) |
| 85 | { |
| 86 | //axis mapping? |
| 87 | if (axisScalars.find(charcode) != axisScalars.end()){ |
| 88 | axisValues[charcode] = state; |
| 89 | } |
| 90 | |
| 91 | //action mapping? |
| 92 | if (awareActionValues.find(charcode) != awareActionValues.end()){ |
| 93 | actionValues.push_back({charcode,static_cast<ActionState>(state)}); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Add a mouse movement event |