From e5f462d5aad10cead4fee310792d8d893d1cd918 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 5 Oct 2015 08:17:13 -0400 Subject: ROTATIONZ --- src/ui.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ui.cpp') 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 -- cgit v1.2.3