summaryrefslogtreecommitdiff
path: root/network_gui.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-12-09 23:16:52 +0000
committerdominik <dominik@openttd.org>2004-12-09 23:16:52 +0000
commit416e2b67b13cd2238599e766ce4e6b65b6121ac8 (patch)
tree45bad2b52e086cfe08d4fac3c784cf65f5c1e9b7 /network_gui.c
parent02bf3ed5c07451ae860bf4a197fca00908eb4293 (diff)
downloadopenttd-416e2b67b13cd2238599e766ce4e6b65b6121ac8.tar.xz
(svn r999) New icons for the network interface, newgrf gui and the tiny euro
Diffstat (limited to 'network_gui.c')
-rw-r--r--network_gui.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/network_gui.c b/network_gui.c
index 5395378c7..537611c09 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -122,14 +122,23 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e)
SetDParam(1, cur_item->info.clients_max);
DrawString(135, y, STR_NETWORK_CLIENTS_ONLINE, 2);
- // draw red or green icon, depending on compatibility with server. TODO: needs new icons
- DrawSprite((SPR_OPENTTD_BASE + 10) | (compatible?0x30d8000:0x30b8000), 185, y);
- // draw red or green flag, to show if the server is password protected. TODO: needs new icons
- DrawSprite((cur_item->info.use_password)? 0xC12 : 0xC13, 195, y);
-
- cur_item = cur_item->next;
- y += NET_PRC__SIZE_OF_ROW;
- if (++n == w->vscroll.cap) { break;} // max number of games in the window
+ // only draw icons if the server is online
+ if(cur_item->online) {
+
+ // draw a lock if the server is password protected.
+ if(cur_item->info.use_password)
+ DrawSprite(SPR_LOCK, 186, y-1);
+
+ // draw red or green icon, depending on compatibility with server.
+ DrawSprite(SPR_BLOT | (compatible?0x30d8000:0x30b8000), 195, y);
+
+ // draw flag according to server language
+ DrawSprite(SPR_FLAGS_BASE + cur_item->info.server_lang, 206, y);
+
+ cur_item = cur_item->next;
+ y += NET_PRC__SIZE_OF_ROW;
+ if (++n == w->vscroll.cap) { break;} // max number of games in the window
+ }
}
}