From d3928f559fbad11ad43114f5b1fc54aeeeeb5b3f Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Wed, 21 Jan 2009 20:39:48 +0000 Subject: [PATCH] fixed big messages in the middle of the server browser so users doesn't miss if their filter catches all servers --- src/game/client/components/menus_browser.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 777363695..02460673e 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -124,6 +124,20 @@ void MENUS::render_serverbrowser_serverlist(RECT view) ui_vsplit_r(&view, 15, &view, &scroll); int num_servers = client_serverbrowse_sorted_num(); + + // display important messages in the middle of the screen so no + // users misses it + { + RECT msgbox = view; + msgbox.y += view.h/3; + + if(client_serverbrowse_refreshingmasters()) + ui_do_label(&msgbox, "Refreshing master servers", 16.0f, 0); + else if(!client_serverbrowse_num()) + ui_do_label(&msgbox, "No servers found", 16.0f, 0); + else if(client_serverbrowse_num() && !num_servers) + ui_do_label(&msgbox, "No servers match your filter criteria", 16.0f, 0); + } int num = (int)(view.h/cols[0].rect.h); static int scrollbar = 0;