MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_key

Method SDL_key

src/InputManager.cpp:84–95  ·  view source on GitHub ↗

* Add a key event * @param state true = pressed, false = released * @param charcode the keycode of the key central to the event */

Source from the content-addressed store, hash-verified

82 * @param charcode the keycode of the key central to the event
83 */
84void 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

Callers 1

runMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected