Added camera operations and better input handling
This commit is contained in:
@@ -10,18 +10,21 @@ InputHandler::~InputHandler() {
|
||||
//Free all Commands
|
||||
}
|
||||
|
||||
void InputHandler::handleInput(SDL_Event *event) {
|
||||
Command* InputHandler::handleInput(SDL_Event *event) {
|
||||
if(event == NULL) {
|
||||
return;
|
||||
return NULL;
|
||||
}
|
||||
switch (event->type) {
|
||||
case SDL_KEYDOWN:
|
||||
std::cout << "The Key " << SDL_GetKeyName(event->key.keysym.sym) << " has been pressed!" << std::endl;
|
||||
|
||||
return NULL;
|
||||
break;
|
||||
case SDL_KEYUP:
|
||||
std::cout << "The Key " << SDL_GetKeyName(event->key.keysym.sym) << " has been released!" << std::endl;
|
||||
return NULL;
|
||||
break;
|
||||
default: break;
|
||||
default:
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user