summaryrefslogtreecommitdiff
path: root/network_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-29 15:32:10 +0000
committertruelight <truelight@openttd.org>2004-12-29 15:32:10 +0000
commite4f558de8c167d87530c14a7918d36cbcf514196 (patch)
tree9994356400ea608b59d1babd3023750dfeb4300e /network_gui.c
parent7bf7cf80eecef6b85baf256c57198262557851af (diff)
downloadopenttd-e4f558de8c167d87530c14a7918d36cbcf514196.tar.xz
(svn r1298) -Fix: [ 1092661 ] On create, the scrollbar of the server-list was not updated
Diffstat (limited to 'network_gui.c')
-rw-r--r--network_gui.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/network_gui.c b/network_gui.c
index 41a0222f0..3a10016ec 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -413,6 +413,19 @@ static const WindowDesc _network_game_window_desc = {
static FiosItem *selected_map = NULL; // to highlight slected map
+// called when a new server is found on the network
+void UpdateNetworkGameWindow(bool unselect)
+{
+ Window *w;
+ w = FindWindowById(WC_NETWORK_WINDOW, 0);
+ if (w != NULL) {
+ if (unselect)
+ _selected_item = NULL;
+ w->vscroll.count = _network_game_count;
+ SetWindowDirty(w);
+ }
+}
+
void ShowNetworkGameWindow()
{
uint i;
@@ -437,19 +450,8 @@ void ShowNetworkGameWindow()
WP(w,querystr_d).maxlen = MAX_QUERYSTR_LEN;
WP(w,querystr_d).maxwidth = 120;
WP(w,querystr_d).buf = _edit_str_buf;
-}
-// called when a new server is found on the network
-void UpdateNetworkGameWindow(bool unselect)
-{
- Window *w;
- w = FindWindowById(WC_NETWORK_WINDOW, 0);
- if (w != NULL) {
- if (unselect)
- _selected_item = NULL;
- w->vscroll.count = _network_game_count;
- SetWindowDirty(w);
- }
+ UpdateNetworkGameWindow(true);
}
static const StringID _players_dropdown[] = {