aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2015-11-13 08:26:31 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2015-11-13 08:26:31 -0500
commit613ab3be6ee76595c04b89992e62c41b52bc1a2f (patch)
tree1265eeb4238d04e4a6bf95df439e61c348342eb0 /src/ui.cpp
parentac52ecab5df8382b51d48a9431f672bfc502a400 (diff)
Added object class, and added quest listing
Diffstat (limited to 'src/ui.cpp')
-rw-r--r--src/ui.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui.cpp b/src/ui.cpp
index 237d09a..edfa786 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -108,6 +108,7 @@ namespace ui {
case 'y':
case 'p':
case 'j':y-=fontSize/4;break;
+ case 'Q':y-=fontSize/5;break;
default:break;
}
glBegin(GL_QUADS);
@@ -217,6 +218,7 @@ namespace ui {
}
setFontSize(14);
putText(((SCREEN_WIDTH/2)+offset.x)-125,(offset.y+SCREEN_HEIGHT/2)-fontSize,"Health: %u/%u",player->health>0?(unsigned)player->health:0,
+
(unsigned)player->maxHealth);
if(player->alive){
glColor3ub(255,0,0);
@@ -225,6 +227,16 @@ namespace ui {
((SCREEN_WIDTH/2+offset.x)-125)+((player->health/player->maxHealth)*100),
(offset.y+SCREEN_HEIGHT/2)-32+12);
}
+
+ /*
+ * Lists all of the quests the player has
+ */
+ putText(((SCREEN_WIDTH/2)+offset.x)-125,(offset.y+SCREEN_HEIGHT/2)-fontSize*4, "Current Quests:",NULL);
+
+ for(auto &c : player->qh.current){
+ putText(((SCREEN_WIDTH/2)+offset.x)-125,(offset.y+SCREEN_HEIGHT/2)-fontSize*5, "%s",c->title);
+ }
+
}
void handleEvents(void){
static bool left=false,right=false;