mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
fixed big messages in the middle of the server browser so users doesn't miss if their filter catches all servers
This commit is contained in:
parent
759c7b0a1a
commit
d3928f559f
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue