#include "manager.hpp" namespace hibis { InputManager::InputManager() {} InputManager::~InputManager() {} bool InputManager::isKeyPressed(int scancode) { if (mKeyScancodes.find(scancode) != mKeyScancodes.end()) return (mKeyScancodes[scancode] == Pressed || mKeyScancodes[scancode] == Held); else return false; } bool InputManager::isKeyJustPressed(int scancode) { if (mKeyScancodes.find(scancode) != mKeyScancodes.end()) return mKeyScancodes[scancode] == Pressed; else return false; } bool InputManager::isKeyJustReleased(int scancode) { if (mKeyScancodes.find(scancode) != mKeyScancodes.end()) return mKeyScancodes[scancode] == Released; else return false; } void InputManager::setKeyPressState(int scancode, PressTypes type) { mKeyScancodes[scancode] = type; } }