We got GameObjects / Components and shit
This commit is contained in:
@@ -97,8 +97,11 @@ void InputManager::RemoveController(SDL_JoystickID instanceId) {
|
||||
);
|
||||
}
|
||||
|
||||
void InputManager::ProcessEvent(const SDL_Event& e) {
|
||||
bool InputManager::ProcessEvent(const SDL_Event& e) {
|
||||
switch (e.type) {
|
||||
case SDL_QUIT: {
|
||||
return true;
|
||||
}
|
||||
case SDL_KEYDOWN: {
|
||||
if (e.key.repeat) break;
|
||||
SDL_Scancode sc = e.key.keysym.scancode;
|
||||
@@ -196,6 +199,7 @@ void InputManager::ProcessEvent(const SDL_Event& e) {
|
||||
|
||||
default: break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool InputManager::IsKeyDown(SDL_Scancode sc) const { return m_keysDown.count(sc) != 0; }
|
||||
|
||||
Reference in New Issue
Block a user