inputManager.cpp 532 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "inputManager.h"
  2. InputManager::InputManager(){
  3. }
  4. InputManager::~InputManager(){
  5. }
  6. bool InputManager::startUp(){
  7. //Nothing to do yet
  8. return true;
  9. }
  10. void InputManager::shutDown(){
  11. //Nothing to do yet
  12. }
  13. bool InputManager::processInput(){
  14. bool done = false;
  15. SDL_Event Event;
  16. while(SDL_PollEvent(&Event)){
  17. done = handleEvent(&Event);
  18. }
  19. return done;
  20. }
  21. bool InputManager::handleEvent(SDL_Event * event){
  22. if(event->type == SDL_QUIT){
  23. return true;
  24. }
  25. return false;
  26. }