# HG changeset patch # User bjarni # Date 1104098974 0 # Node ID ae0f50883ac092b58e23912b45a8dbe374211041 # Parent 1991bcb12abcdd103d64595750ea7d5eb9796ff8 (svn r1279) Fixed the scrollbar in the network gui(server list). It now updates when scrolling (HackyKid) diff -r 1991bcb12abc -r ae0f50883ac0 network_gui.c --- a/network_gui.c Sat Dec 25 20:59:11 2004 +0000 +++ b/network_gui.c Sun Dec 26 22:09:34 2004 +0000 @@ -110,8 +110,13 @@ { // 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)