aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-10-05 08:17:13 -0400
committerClyne Sullivan <tullivan99@gmail.com>2015-10-05 08:17:13 -0400
commite5f462d5aad10cead4fee310792d8d893d1cd918 (patch)
tree01771259ce20b88f448e7d5978f9ec8ff575b938 /src/ui.cpp
parent9c7af916fce7252ee0608be8c918b0378249c832 (diff)
ROTATIONZ
Diffstat (limited to 'src/ui.cpp')
-rw-r--r--src/ui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui.cpp b/src/ui.cpp
index 80ecc69..cd5de15 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -12,12 +12,12 @@ static FT_Library ftl; // Variables for the FreeType library and stuff
static FT_Face ftf;
static GLuint ftex;
-static bool dialogBoxExists=false;
static char *dialogBoxText;
namespace ui {
vec2 mouse;
bool debug=false;
+ bool dialogBoxExists=false;
unsigned int fontSize;
/*
* initFonts(), setFontFace(), and setFontSize() are pretty self-explanatory
@@ -184,6 +184,7 @@ namespace ui {
*/
case SDL_KEYDOWN:
if(SDL_KEY==SDLK_ESCAPE)gameRunning=false; // Exit the game with ESC
+ if(!dialogBoxExists){
if(SDL_KEY==SDLK_a){ // Move left
left=true;
player->vel.x=-.15;
@@ -212,8 +213,9 @@ namespace ui {
}
if(SDL_KEY==SDLK_i)currentWorld=currentWorld->goWorldBack(player); // Go back a layer if possible
if(SDL_KEY==SDLK_k)currentWorld=currentWorld->goWorldFront(player); // Go forward a layer if possible
+ if(SDL_KEY==SDLK_LSHIFT)player->speed = 3; // Sprint
+ }
if(SDL_KEY==SDLK_F3)debug^=true;
- if(SDL_KEY==SDLK_LSHIFT)player->speed = 3;
break;
/*
KEYUP