about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authorAlfred Eriksson <somerunce@gmail.com>2008-09-07 15:07:08 +0000
committerAlfred Eriksson <somerunce@gmail.com>2008-09-07 15:07:08 +0000
commit6a4e17ea8520e9eb3a88ce15a9e337679d631775 (patch)
tree8cb37dd59dc79ae006efd019d19e25de1a6c5efa /src/game/client
parenta92c6d44dcb62675cf1937e1e618e50010345ac7 (diff)
downloadzcatch-6a4e17ea8520e9eb3a88ce15a9e337679d631775.tar.gz
zcatch-6a4e17ea8520e9eb3a88ce15a9e337679d631775.zip
added round number to the scoreboard
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/components/scoreboard.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp
index e0c7765a..9159d391 100644
--- a/src/game/client/components/scoreboard.cpp
+++ b/src/game/client/components/scoreboard.cpp
@@ -42,17 +42,29 @@ void SCOREBOARD::render_goals(float x, float y, float w)
 
 	// render goals
 	//y = ystart+h-54;
+	float tw = 0.0f;
+	if(gameclient.snap.gameobj && gameclient.snap.gameobj->score_limit)
+	{
+		char buf[64];
+		str_format(buf, sizeof(buf), "Score Limit: %d", gameclient.snap.gameobj->score_limit);
+		gfx_text(0, x+20.0f, y, 22.0f, buf, -1);
+		tw += gfx_text_width(0, 22.0f, buf, -1);
+	}
 	if(gameclient.snap.gameobj && gameclient.snap.gameobj->time_limit)
 	{
 		char buf[64];
 		str_format(buf, sizeof(buf), "Time Limit: %d min", gameclient.snap.gameobj->time_limit);
-		gfx_text(0, x+w/2, y, 24.0f, buf, -1);
+		gfx_text(0, x+220.0f, y, 22.0f, buf, -1);
+		tw += gfx_text_width(0, 22.0f, buf, -1);
 	}
-	if(gameclient.snap.gameobj && gameclient.snap.gameobj->score_limit)
+	if(gameclient.snap.gameobj && gameclient.snap.gameobj->round_num && gameclient.snap.gameobj->round_current)
 	{
 		char buf[64];
-		str_format(buf, sizeof(buf), "Score Limit: %d", gameclient.snap.gameobj->score_limit);
-		gfx_text(0, x+40, y, 24.0f, buf, -1);
+		str_format(buf, sizeof(buf), "Round %d/%d", gameclient.snap.gameobj->round_current, gameclient.snap.gameobj->round_num);
+		gfx_text(0, x+450.0f, y, 22.0f, buf, -1);
+		
+	/*[48c3fd4c][game/scoreboard]: timelimit x:219.428558
+	[48c3fd4c][game/scoreboard]: round x:453.142822*/
 	}
 }