about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authorAlfred Eriksson <somerunce@gmail.com>2008-09-04 18:45:41 +0000
committerAlfred Eriksson <somerunce@gmail.com>2008-09-04 18:45:41 +0000
commit4c2632b7b6ae03e9d54d4a2d72742b6865700143 (patch)
tree22181ad566d69ec29e78d8355f53f179b9a4ea54 /src/game
parent7248dd641def707fd518486caa9449e672187023 (diff)
downloadzcatch-4c2632b7b6ae03e9d54d4a2d72742b6865700143.tar.gz
zcatch-4c2632b7b6ae03e9d54d4a2d72742b6865700143.zip
merge from 0.4.3: version-notification on client
Diffstat (limited to 'src/game')
-rw-r--r--src/game/client/components/menus.cpp2
-rw-r--r--src/game/client/components/menus_browser.cpp8
-rw-r--r--src/game/variables.hpp2
3 files changed, 10 insertions, 2 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp
index de2e5711..cf817083 100644
--- a/src/game/client/components/menus.cpp
+++ b/src/game/client/components/menus.cpp
@@ -709,7 +709,7 @@ void MENUS::render_game(RECT main_view)
 					gameclient.send_switch_team(0);
 					menu_active = false;
 				}
-			}						
+			}
 		}
 	}
 }
diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp
index c213e3f1..6354ee22 100644
--- a/src/game/client/components/menus_browser.cpp
+++ b/src/game/client/components/menus_browser.cpp
@@ -14,6 +14,7 @@ extern "C" {
 #include <game/client/ui.hpp>
 #include <game/client/gc_render.hpp>
 #include "menus.hpp"
+#include <game/version.hpp>
 
 void MENUS::render_serverbrowser_serverlist(RECT view)
 {
@@ -593,7 +594,12 @@ void MENUS::render_serverbrowser(RECT main_view)
 				client_serverbrowse_refresh(1);
 		}
 		
-		ui_do_label(&status_toolbar, "new version.. LOLZ!!", 14.0f, -1);
+		char buf[512];
+		if(strcmp(client_latestversion(), "0") != 0)
+			str_format(buf, sizeof(buf), "Teeworlds %s is out! Download it at www.teeworlds.com! Current version: %s", client_latestversion(), GAME_VERSION);
+		else
+			str_format(buf, sizeof(buf), "Current version: %s", GAME_VERSION);
+		ui_do_label(&status_toolbar, buf, 14.0f, -1);
 	}
 	
 	// do the button box
diff --git a/src/game/variables.hpp b/src/game/variables.hpp
index 543e9e1f..2803915c 100644
--- a/src/game/variables.hpp
+++ b/src/game/variables.hpp
@@ -26,6 +26,8 @@ MACRO_CONFIG_INT(cl_flow, 0, 0, 1)
 MACRO_CONFIG_INT(cl_show_welcome, 1, 0, 1)
 MACRO_CONFIG_INT(cl_motd_time, 10, 0, 100)
 
+MACRO_CONFIG_STR(cl_version_server, 100, "version.teeworlds.com")
+
 MACRO_CONFIG_INT(player_use_custom_color, 0, 0, 1)
 MACRO_CONFIG_INT(player_color_body, 65408, 0, 0)
 MACRO_CONFIG_INT(player_color_feet, 65408, 0, 0)