summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-01-31 20:05:44 +0000
committerDarkvater <darkvater@openttd.org>2006-01-31 20:05:44 +0000
commit9d07426a29817fbaddcb8f8c726e16a32bb123d0 (patch)
tree230cf97d4e6ddc5af40a0d98f4c232eedfc89289
parent4e2bb34be3f2fab054b625eb8dfc015b3b08a568 (diff)
downloadopenttd-9d07426a29817fbaddcb8f8c726e16a32bb123d0.tar.xz
(svn r3499) - Fix: a few gui glitches in the network window:
1. disable widgets also when the active companies/spectators is bigger than the max. This can happen if the server has changed the settings. 2. updated scroll-count in the lobby as the window is higher.
-rw-r--r--network_gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/network_gui.c b/network_gui.c
index 9a6566404..1c468e83c 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -778,7 +778,7 @@ static void ShowNetworkStartServerWindow(void)
_saveload_mode = SLD_NEW_GAME;
BuildFileList();
- w->vscroll.cap = 9;
+ w->vscroll.cap = 12;
w->vscroll.count = _fios_num+1;
WP(w, network_ql_d).q.text.caret = true;
@@ -820,8 +820,8 @@ static void NetworkLobbyWindowWndProc(Window *w, WindowEvent *e)
w->disabled_state = 0;
if (nd->company == (byte)-1) SETBIT(w->disabled_state, 7);
- if (gi->companies_on == gi->companies_max) SETBIT(w->disabled_state, 8);
- if (gi->spectators_on == gi->spectators_max) SETBIT(w->disabled_state, 9);
+ if (gi->companies_on >= gi->companies_max) SETBIT(w->disabled_state, 8);
+ if (gi->spectators_on >= gi->spectators_max) SETBIT(w->disabled_state, 9);
/* You can not join a server as spectator when it has no companies active..
* it causes some nasty crashes */
if (gi->companies_on == 0) SETBIT(w->disabled_state, 9);