aboutsummaryrefslogtreecommitdiffstats
path: root/src/UIClass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/UIClass.cpp')
-rw-r--r--src/UIClass.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/UIClass.cpp b/src/UIClass.cpp
new file mode 100644
index 0000000..711440a
--- /dev/null
+++ b/src/UIClass.cpp
@@ -0,0 +1,21 @@
+#include "UIClass.h"
+
+void UIClass::handleEvents(){
+ while(SDL_PollEvent(&e)){
+ switch(e.type){
+ case SDL_QUIT:
+ gameRunning=false;
+ break;
+ case SDL_KEYDOWN:
+ switch(e.key.keysym.sym){
+ case 27:
+ gameRunning=false;
+ break;
+ default:
+ break;
+ }
+ default:
+ break;
+ }
+ }
+} \ No newline at end of file