diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-06-15 09:46:25 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-06-15 09:46:25 +0000 |
| commit | b3c1bae2e917faf6e2f4e9f3075195a03a16f8ba (patch) | |
| tree | c48d376273ccc54f65698ab797816afa9cb67d0a /src/game | |
| parent | a934488e9f2c5aeb1997a4b3b9ecdad2537686d1 (diff) | |
| download | zcatch-b3c1bae2e917faf6e2f4e9f3075195a03a16f8ba.tar.gz zcatch-b3c1bae2e917faf6e2f4e9f3075195a03a16f8ba.zip | |
cleaned up localization. fixed motd so it shows when connecting to a server
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/client/components/menus.cpp | 4 | ||||
| -rw-r--r-- | src/game/client/components/menus_browser.cpp | 22 | ||||
| -rw-r--r-- | src/game/client/components/menus_settings.cpp | 2 | ||||
| -rw-r--r-- | src/game/client/components/motd.cpp | 11 | ||||
| -rw-r--r-- | src/game/client/components/motd.hpp | 2 |
5 files changed, 14 insertions, 27 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index f415fba6..a8165418 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -867,7 +867,7 @@ int MENUS::render() ui_vsplit_l(&label, 100.0f, 0, &textbox); ui_vsplit_l(&textbox, 20.0f, 0, &textbox); ui_vsplit_r(&textbox, 60.0f, &textbox, 0); - ui_do_label(&label, localize("Password:"), 20, -1); + ui_do_label(&label, localize("Password"), 20, -1); ui_do_edit_box(&config.password, &textbox, config.password, sizeof(config.password), 14.0f, true); } else if(popup == POPUP_FIRST_LAUNCH) @@ -889,7 +889,7 @@ int MENUS::render() ui_vsplit_l(&label, 100.0f, 0, &textbox); ui_vsplit_l(&textbox, 20.0f, 0, &textbox); ui_vsplit_r(&textbox, 60.0f, &textbox, 0); - ui_do_label(&label, localize("Nickname:"), 20, -1); + ui_do_label(&label, localize("Nickname"), 20, -1); ui_do_edit_box(&config.player_name, &textbox, config.player_name, sizeof(config.player_name), 14.0f); } else diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index a5fdab07..a7f21084 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -49,7 +49,6 @@ void MENUS::render_serverbrowser_serverlist(RECT view) COL_MAP, COL_PLAYERS, COL_PING, - COL_PROGRESS, COL_VERSION, }; @@ -292,12 +291,6 @@ void MENUS::render_serverbrowser_serverlist(RECT view) str_format(temp, sizeof(temp), "%i", item->latency); ui_do_label(&button, temp, 12.0f, 1); } - else if(id == COL_PROGRESS) - { - if(item->progression > 100) - item->progression = 100; - ui_draw_browse_icon(item->progression, &button); - } else if(id == COL_VERSION) { const char *version = item->version; @@ -330,8 +323,10 @@ void MENUS::render_serverbrowser_serverlist(RECT view) // render quick search RECT quicksearch; ui_vsplit_l(&status, 250.0f, &quicksearch, &status); - ui_do_label(&quicksearch, localize("Quick search:"), 14.0f, -1); - ui_vsplit_l(&quicksearch, gfx_text_width(0, 14.0f, localize("Quick search:"), -1), 0, &quicksearch); + const char *label = localize("Quick search"); + ui_do_label(&quicksearch, label, 14.0f, -1); + ui_vsplit_l(&quicksearch, gfx_text_width(0, 14.0f, label, -1), 0, &quicksearch); + ui_vsplit_l(&quicksearch, 5, 0, &quicksearch); ui_do_edit_box(&config.b_filter_string, &quicksearch, config.b_filter_string, sizeof(config.b_filter_string), 14.0f); // render status @@ -443,7 +438,6 @@ void MENUS::render_serverbrowser_serverdetail(RECT view) static LOC_CONSTSTRING labels[] = { localize("Version"), localize("Game type"), - localize("Progression"), localize("Ping")}; RECT left_column; @@ -480,14 +474,6 @@ void MENUS::render_serverbrowser_serverdetail(RECT view) ui_do_label(&row, selected_server->gametype, font_size, -1); char temp[16]; - - if(selected_server->progression < 0) - str_format(temp, sizeof(temp), localize("N/A")); - else - str_format(temp, sizeof(temp), "%d%%", selected_server->progression); - ui_hsplit_t(&right_column, 15.0f, &row, &right_column); - ui_do_label(&row, temp, font_size, -1); - str_format(temp, sizeof(temp), "%d", selected_server->latency); ui_hsplit_t(&right_column, 15.0f, &row, &right_column); ui_do_label(&row, temp, font_size, -1); diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 3e5fe65f..86325ab9 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -277,7 +277,7 @@ static KEYINFO keys[] = { localize("Prev. weapon"), "+prevweapon", 0 }, { localize("Vote yes"), "vote yes", 0 }, { localize("Vote no"), "vote no", 0 }, - { localize("Chat:"), "chat all", 0 }, + { localize("Chat"), "chat all", 0 }, { localize("Team chat"), "chat team", 0 }, { localize("Emoticon"), "+emote", 0 }, { localize("Console"), "toggle_local_console", 0 }, diff --git a/src/game/client/components/motd.cpp b/src/game/client/components/motd.cpp index 3b8f2243..0d1eacba 100644 --- a/src/game/client/components/motd.cpp +++ b/src/game/client/components/motd.cpp @@ -6,11 +6,6 @@ #include <game/client/gameclient.hpp> #include "motd.hpp" - -void MOTD::on_reset() -{ - clear(); -} void MOTD::clear() { @@ -22,6 +17,12 @@ bool MOTD::is_active() return time_get() < server_motd_time; } +void MOTD::on_statechange(int new_state, int old_state) +{ + if(old_state == CLIENTSTATE_ONLINE || old_state == CLIENTSTATE_OFFLINE) + clear(); +} + void MOTD::on_render() { if(!is_active()) diff --git a/src/game/client/components/motd.hpp b/src/game/client/components/motd.hpp index 5ee16086..3b175e0a 100644 --- a/src/game/client/components/motd.hpp +++ b/src/game/client/components/motd.hpp @@ -10,8 +10,8 @@ public: void clear(); bool is_active(); - virtual void on_reset(); virtual void on_render(); + virtual void on_statechange(int new_state, int old_state); virtual void on_message(int msgtype, void *rawmsg); virtual bool on_input(INPUT_EVENT e); }; |