diff --git a/media/baseset/openttd.grf b/media/baseset/openttd.grf
index a63bfc4e29..c4511f55ea 100644
Binary files a/media/baseset/openttd.grf and b/media/baseset/openttd.grf differ
diff --git a/media/baseset/openttd/openttdgui.nfo b/media/baseset/openttd/openttdgui.nfo
index eb1313365e..9a13fa8000 100644
--- a/media/baseset/openttd/openttdgui.nfo
+++ b/media/baseset/openttd/openttdgui.nfo
@@ -4,7 +4,7 @@
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
//
-1 * 0 0C "OpenTTD GUI graphics"
- -1 * 3 05 15 \b 186 // OPENTTD_SPRITE_COUNT
+ -1 * 3 05 15 \b 189 // OPENTTD_SPRITE_COUNT
-1 sprites/openttdgui.png 8bpp 66 8 64 31 -31 7 normal
-1 sprites/openttdgui.png 8bpp 146 8 64 31 -31 7 normal
-1 sprites/openttdgui.png 8bpp 226 8 64 31 -31 7 normal
@@ -191,3 +191,6 @@
-1 sprites/openttdgui_convert_tram.png 8bpp 24 0 32 32 0 0 normal
-1 sprites/openttdgui.png 8bpp 513 440 10 10 0 0 normal
-1 sprites/openttdgui.png 8bpp 526 440 10 10 0 0 normal
+ -1 sprites/openttdgui.png 8bpp 539 440 12 10 0 0 normal
+ -1 sprites/openttdgui.png 8bpp 553 440 12 10 0 0 normal
+ -1 sprites/openttdgui.png 8bpp 567 440 12 10 0 0 normal
diff --git a/media/baseset/openttd/openttdgui.png b/media/baseset/openttd/openttdgui.png
index 1fc02aa61e..dc0976a971 100644
Binary files a/media/baseset/openttd/openttdgui.png and b/media/baseset/openttd/openttdgui.png differ
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index ab9e7e12ef..c3483a9bfe 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -571,8 +571,8 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY)
GeneratePresidentName(c);
SetWindowDirty(WC_GRAPH_LEGEND, 0);
- SetWindowClassesDirty(WC_CLIENT_LIST_POPUP);
- SetWindowDirty(WC_CLIENT_LIST, 0);
+ InvalidateWindowClassesData(WC_CLIENT_LIST_POPUP);
+ InvalidateWindowData(WC_CLIENT_LIST, 0);
InvalidateWindowData(WC_LINKGRAPH_LEGEND, 0);
BuildOwnerLegend();
InvalidateWindowData(WC_SMALLMAP, 0, 1);
diff --git a/src/lang/english.txt b/src/lang/english.txt
index ff12f122af..13cde55d95 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -1991,6 +1991,9 @@ STR_FACE_TIE :Tie:
STR_FACE_EARRING :Earring:
STR_FACE_TIE_EARRING_TOOLTIP :{BLACK}Change tie or earring
+STR_NETWORK_SERVER_VISIBILITY_PRIVATE :Private
+STR_NETWORK_SERVER_VISIBILITY_PUBLIC :Public
+
# Network server list
STR_NETWORK_SERVER_LIST_CAPTION :{WHITE}Multiplayer
STR_NETWORK_SERVER_LIST_PLAYER_NAME :{BLACK}Player name:
@@ -2053,10 +2056,8 @@ STR_NETWORK_START_SERVER_NEW_GAME_NAME_TOOLTIP :{BLACK}The game
STR_NETWORK_START_SERVER_SET_PASSWORD :{BLACK}Set password
STR_NETWORK_START_SERVER_PASSWORD_TOOLTIP :{BLACK}Protect your game with a password if you don't want it to be publicly accessible
-STR_NETWORK_START_SERVER_ADVERTISED_LABEL :{BLACK}Advertised
-STR_NETWORK_START_SERVER_ADVERTISED_TOOLTIP :{BLACK}Choose between an advertised (internet) and a not advertised (Local Area Network, LAN) game
-STR_NETWORK_START_SERVER_UNADVERTISED :No
-STR_NETWORK_START_SERVER_ADVERTISED :Yes
+STR_NETWORK_START_SERVER_VISIBILITY_LABEL :{BLACK}Visibility
+STR_NETWORK_START_SERVER_VISIBILITY_TOOLTIP :{BLACK}Whether other people can see your server in the public listing
STR_NETWORK_START_SERVER_CLIENTS_SELECT :{BLACK}{NUM} client{P "" s}
STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS :{BLACK}Maximum number of clients:
STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS_TOOLTIP :{BLACK}Choose the maximum number of clients. Not all slots need to be filled
@@ -2118,19 +2119,37 @@ STR_NETWORK_CONNECTION_DISCONNECT :{BLACK}Disconne
STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}Server is protected. Enter password
STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Company is protected. Enter password
-STR_NETWORK_COMPANY_LIST_CLIENT_LIST_CAPTION :{WHITE}Client list
# Network company list added strings
-STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Client list
-STR_NETWORK_COMPANY_LIST_SPECTATE :Spectate
+STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Online players
STR_NETWORK_COMPANY_LIST_NEW_COMPANY :New company
-# Network client list
+# Network client list popup for clients
STR_NETWORK_CLIENTLIST_KICK :Kick
STR_NETWORK_CLIENTLIST_BAN :Ban
-STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Speak to all
-STR_NETWORK_CLIENTLIST_SPEAK_TO_COMPANY :Speak to company
-STR_NETWORK_CLIENTLIST_SPEAK_TO_CLIENT :Private message
+
+# Network client list
+STR_NETWORK_CLIENT_LIST_CAPTION :{WHITE}Multiplayer
+STR_NETWORK_CLIENT_LIST_SERVER :{BLACK}Server
+STR_NETWORK_CLIENT_LIST_SERVER_NAME :{BLACK}Name
+STR_NETWORK_CLIENT_LIST_SERVER_NAME_TOOLTIP :{BLACK}Name of the server you are playing on
+STR_NETWORK_CLIENT_LIST_SERVER_NAME_EDIT_TOOLTIP :{BLACK}Edit the name of your server
+STR_NETWORK_CLIENT_LIST_SERVER_NAME_QUERY_CAPTION :Name of the server
+STR_NETWORK_CLIENT_LIST_SERVER_VISIBILITY :{BLACK}Visibility
+STR_NETWORK_CLIENT_LIST_SERVER_VISIBILITY_TOOLTIP :{BLACK}Whether other people can see your server in the public listing
+STR_NETWORK_CLIENT_LIST_PLAYER :{BLACK}Player
+STR_NETWORK_CLIENT_LIST_PLAYER_NAME :{BLACK}Name
+STR_NETWORK_CLIENT_LIST_PLAYER_NAME_TOOLTIP :{BLACK}Your player name
+STR_NETWORK_CLIENT_LIST_PLAYER_NAME_EDIT_TOOLTIP :{BLACK}Edit your player name
+STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION :Your player name
+STR_NETWORK_CLIENT_LIST_PLAYER_HOST :{WHITE}(host) {BLACK}{RAW_STRING}
+STR_NETWORK_CLIENT_LIST_PLAYER_SELF :{WHITE}(you) {BLACK}{RAW_STRING}
+STR_NETWORK_CLIENT_LIST_ADMIN_TOOLTIP :{BLACK}Administrative actions to perform for this client
+STR_NETWORK_CLIENT_LIST_JOIN_TOOLTIP :{BLACK}Join this company
+STR_NETWORK_CLIENT_LIST_CHAT_CLIENT_TOOLTIP :{BLACK}Send a message to this player
+STR_NETWORK_CLIENT_LIST_CHAT_COMPANY_TOOLTIP :{BLACK}Send a message to all players of this company
+STR_NETWORK_CLIENT_LIST_CHAT_SPECTATOR_TOOLTIP :{BLACK}Send a message to all spectators
+STR_NETWORK_CLIENT_LIST_SPECTATORS :Spectators
STR_NETWORK_SERVER :Server
STR_NETWORK_CLIENT :Client
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 97eadb9768..1e0838684e 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -522,9 +522,10 @@ void ParseGameConnectionString(const char **company, const char **port, char *co
/* Register the login */
_network_clients_connected++;
- SetWindowDirty(WC_CLIENT_LIST, 0);
ServerNetworkGameSocketHandler *cs = new ServerNetworkGameSocketHandler(s);
cs->client_address = address; // Save the IP of the client
+
+ InvalidateWindowData(WC_CLIENT_LIST, 0);
}
/**
@@ -713,7 +714,7 @@ void NetworkClientConnectGame(NetworkAddress address, CompanyID join_as, const c
static void NetworkInitGameInfo()
{
if (StrEmpty(_settings_client.network.server_name)) {
- seprintf(_settings_client.network.server_name, lastof(_settings_client.network.server_name), "Unnamed Server");
+ strecpy(_settings_client.network.server_name, "Unnamed Server", lastof(_settings_client.network.server_name));
}
/* The server is a client too */
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index 72f69f99f7..985e15d841 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -645,7 +645,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(Pac
ci->client_playas = playas;
strecpy(ci->client_name, name, lastof(ci->client_name));
- SetWindowDirty(WC_CLIENT_LIST, 0);
+ InvalidateWindowData(WC_CLIENT_LIST, 0);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -664,7 +664,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(Pac
strecpy(ci->client_name, name, lastof(ci->client_name));
- SetWindowDirty(WC_CLIENT_LIST, 0);
+ InvalidateWindowData(WC_CLIENT_LIST, 0);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -1041,7 +1041,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_ERROR_QUIT(Pack
delete ci;
}
- SetWindowDirty(WC_CLIENT_LIST, 0);
+ InvalidateWindowData(WC_CLIENT_LIST, 0);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -1060,7 +1060,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_QUIT(Packet *p)
DEBUG(net, 0, "Unknown client (%d) is leaving the game", client_id);
}
- SetWindowDirty(WC_CLIENT_LIST, 0);
+ InvalidateWindowData(WC_CLIENT_LIST, 0);
/* If we come here it means we could not locate the client.. strange :s */
return NETWORK_RECV_STATUS_OKAY;
@@ -1077,7 +1077,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_JOIN(Packet *p)
NetworkTextMessage(NETWORK_ACTION_JOIN, CC_DEFAULT, false, ci->client_name);
}
- SetWindowDirty(WC_CLIENT_LIST, 0);
+ InvalidateWindowData(WC_CLIENT_LIST, 0);
return NETWORK_RECV_STATUS_OKAY;
}
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index dd25ad5bc1..fcfeded5a5 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -21,6 +21,7 @@
#include "network_udp.h"
#include "../window_func.h"
#include "../gfx_func.h"
+#include "../widgets/dropdown_type.h"
#include "../widgets/dropdown_func.h"
#include "../querystring_gui.h"
#include "../sortlist_type.h"
@@ -30,6 +31,8 @@
#include "../map_type.h"
#include "../guitimer_func.h"
#include "../zoom_func.h"
+#include "../sprite.h"
+#include "../settings_internal.h"
#include "../widgets/network_widget.h"
@@ -38,21 +41,24 @@
#include "../stringfilter_type.h"
-#include "../safeguards.h"
-
#ifdef __EMSCRIPTEN__
# include
#endif
+#include