summaryrefslogtreecommitdiff
path: root/src/keyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.cpp')
-rw-r--r--src/keyboard.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/keyboard.cpp b/src/keyboard.cpp
index 8f5d81c..8c94c68 100644
--- a/src/keyboard.cpp
+++ b/src/keyboard.cpp
@@ -7,6 +7,7 @@ Keyboard::Keyboard(){
releasedDown = new KeyboardDownReleased;
pressedLeft = new KeyboardLeftPressed;
pressedRight = new KeyboardRightPressed;
+ pressedSpace = new KeyboardSpacePressed;
}
Keyboard::~Keyboard(){
delete nop;
@@ -14,6 +15,7 @@ Keyboard::~Keyboard(){
delete releasedDown;
delete pressedLeft;
delete pressedRight;
+ delete pressedSpace;
}
Command* Keyboard::handleEvent( SDL_Event e ){
@@ -35,6 +37,8 @@ Command* Keyboard::pressed( SDL_Keycode k, Uint16 mod ){
return pressedLeft;
case SDLK_RIGHT:
return pressedRight;
+ case SDLK_SPACE:
+ return pressedSpace;
default:
return nop;
}