This commit is contained in:
Julian Nießner
2018-05-01 15:19:29 +02:00
parent 515fe8a109
commit e0ce5983e8
45 changed files with 1236 additions and 582 deletions

27
src/InputHandler.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include "InputHandler.h"
#include <iostream>
InputHandler::InputHandler() {
}
InputHandler::~InputHandler() {
//Free all Commands
}
void InputHandler::handleInput(SDL_Event *event) {
if(event == NULL) {
return;
}
switch (event->type) {
case SDL_KEYDOWN:
std::cout << "The Key " << SDL_GetKeyName(event->key.keysym.sym) << " has been pressed!" << std::endl;
break;
case SDL_KEYUP:
std::cout << "The Key " << SDL_GetKeyName(event->key.keysym.sym) << " has been released!" << std::endl;
break;
default: break;
}
}