diff options
author | bjarni <bjarni@openttd.org> | 2004-12-26 22:09:34 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2004-12-26 22:09:34 +0000 |
commit | d1b6768398d89b2730777269cb32a8023860f137 (patch) | |
tree | 96ab33af863fcb6a68cba6e08047fdccebfb6abe | |
parent | 00a65157cb03edf3744674b3027746357ee092e5 (diff) | |
download | openttd-d1b6768398d89b2730777269cb32a8023860f137.tar.xz |
(svn r1279) Fixed the scrollbar in the network gui(server list). It now updates when scrolling (HackyKid)
-rw-r--r-- | network_gui.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/network_gui.c b/network_gui.c index 4fa7e082b..27fbd1b22 100644 --- a/network_gui.c +++ b/network_gui.c @@ -110,8 +110,13 @@ static void NetworkGameWindowWndProc(Window *w, WindowEvent *e) { // draw list of games uint16 y = NET_PRC__OFFSET_TOP_WIDGET + 3; int32 n = 0; + int32 pos=w->vscroll.pos; char servername[NETWORK_NAME_LENGTH]; const NetworkGameList *cur_item = _network_game_list; + while (pos>0 && cur_item != NULL) { + --pos; + cur_item = cur_item->next; + } while (cur_item != NULL) { bool compatible = (strncmp(cur_item->info.server_revision, _openttd_revision, NETWORK_REVISION_LENGTH - 1) == 0); if (strncmp(cur_item->info.server_revision, NOREV_STRING, sizeof(cur_item->info.server_revision)) == 0) |