diff options
author | Patric Stout <truebrain@openttd.org> | 2021-10-03 11:02:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 11:02:28 +0200 |
commit | e4ad6329891c9235336649ef4412b2ce0a073af8 (patch) | |
tree | 40e441dc003fe6383de2123c82bc5a595881a043 /src/network/network_gamelist.h | |
parent | 2144cd98a34efd7b47156d6f43ee5de7d6216d86 (diff) | |
download | openttd-e4ad6329891c9235336649ef4412b2ce0a073af8.tar.xz |
Add: [Network] Keep the refresh button in lowered state while refreshing (#9600)
This gives user visual feedback that the refresh is still pending, and
prevents people from clicking again and again thinking nothing is
happening. This is especially true for connections that fall back to
TURN, as that takes a few seconds to kick in.
Additionally, prevent clicking on the button again while a refresh
is pending. This is only delaying a successful result.
Diffstat (limited to 'src/network/network_gamelist.h')
-rw-r--r-- | src/network/network_gamelist.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/network_gamelist.h b/src/network/network_gamelist.h index 24ce41bc8..1c4a68e5c 100644 --- a/src/network/network_gamelist.h +++ b/src/network/network_gamelist.h @@ -31,7 +31,7 @@ struct NetworkGameList { std::string connection_string; ///< Address of the server. NetworkGameListStatus status = NGLS_OFFLINE; ///< Stats of the server. bool manually = false; ///< True if the server was added manually. - uint8 retries = 0; ///< Number of retries (to stop requerying). + bool refreshing = false; ///< Whether this server is being queried. int version = 0; ///< Used to see which servers are no longer available on the Game Coordinator and can be removed. NetworkGameList *next = nullptr; ///< Next pointer to make a linked game list. }; |