cleanup
This commit is contained in:
27
src/InputHandler.cpp
Normal file
27
src/InputHandler.cpp
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user