summaryrefslogtreecommitdiff
path: root/src/network/network_client.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-04-18 09:54:47 +0200
committerPatric Stout <github@truebrain.nl>2021-04-24 21:43:58 +0200
commit526635942451479bee66e9eb61c50f91ae48a7dd (patch)
tree34a757634102f384eb2e70ae1044dd86916243f9 /src/network/network_client.cpp
parentaca20092aadd65a764f1ea493c36f0ca507b32ff (diff)
downloadopenttd-526635942451479bee66e9eb61c50f91ae48a7dd.tar.xz
Feature: rework in-game Online Players GUI
The GUI now more clearly shows some basic information about the server you joined, your client name (and the ability to change it), and what players are in which company. It also contains useful buttons to press to join companies, chat with other people, and for admins to kick/ban people. Additionally, renamed "advertised" to "visibility"; this has to do with future additions, but also because it is more clear in wording.
Diffstat (limited to 'src/network/network_client.cpp')
-rw-r--r--src/network/network_client.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index 6156dc486..d5fe64b11 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -647,7 +647,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;
}
@@ -666,7 +666,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;
}
@@ -1043,7 +1043,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;
}
@@ -1062,7 +1062,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;
@@ -1079,7 +1079,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;
}