mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
Cleanup: remove UI for asking user for company password
This commit is contained in:
parent
457d51fc49
commit
849d1fa1b3
@ -2460,7 +2460,6 @@ STR_NETWORK_CONNECTING_SPECIAL_2 :{BLACK}Fetching
|
||||
STR_NETWORK_CONNECTION_DISCONNECT :{BLACK}Disconnect
|
||||
|
||||
STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}Server is protected. Enter password
|
||||
STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Company is protected. Enter password
|
||||
|
||||
# Network company list added strings
|
||||
STR_NETWORK_COMPANY_LIST_CLIENT_LIST :Online players
|
||||
|
@ -709,7 +709,7 @@ class ClientGamePasswordRequestHandler : public NetworkAuthenticationPasswordReq
|
||||
if (!_network_join.server_password.empty()) {
|
||||
request->Reply(_network_join.server_password);
|
||||
} else {
|
||||
ShowNetworkNeedPassword(NETWORK_GAME_PASSWORD, request);
|
||||
ShowNetworkNeedPassword(request);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2208,19 +2208,13 @@ void ShowJoinStatusWindow()
|
||||
new NetworkJoinStatusWindow(&_network_join_status_window_desc);
|
||||
}
|
||||
|
||||
void ShowNetworkNeedPassword(NetworkPasswordType npt, std::shared_ptr<NetworkAuthenticationPasswordRequest> request)
|
||||
void ShowNetworkNeedPassword(std::shared_ptr<NetworkAuthenticationPasswordRequest> request)
|
||||
{
|
||||
NetworkJoinStatusWindow *w = dynamic_cast<NetworkJoinStatusWindow *>(FindWindowById(WC_NETWORK_STATUS_WINDOW, WN_NETWORK_STATUS_WINDOW_JOIN));
|
||||
if (w == nullptr) return;
|
||||
w->request = request;
|
||||
|
||||
StringID caption;
|
||||
switch (npt) {
|
||||
default: NOT_REACHED();
|
||||
case NETWORK_GAME_PASSWORD: caption = STR_NETWORK_NEED_GAME_PASSWORD_CAPTION; break;
|
||||
case NETWORK_COMPANY_PASSWORD: caption = STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION; break;
|
||||
}
|
||||
ShowQueryString(STR_EMPTY, caption, NETWORK_PASSWORD_LENGTH, w, CS_ALPHANUMERAL, QSF_PASSWORD);
|
||||
ShowQueryString(STR_EMPTY, STR_NETWORK_NEED_GAME_PASSWORD_CAPTION, NETWORK_PASSWORD_LENGTH, w, CS_ALPHANUMERAL, QSF_NONE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "network_type.h"
|
||||
#include "network_gamelist.h"
|
||||
|
||||
void ShowNetworkNeedPassword(NetworkPasswordType npt, std::shared_ptr<class NetworkAuthenticationPasswordRequest> request);
|
||||
void ShowNetworkNeedPassword(std::shared_ptr<class NetworkAuthenticationPasswordRequest> request);
|
||||
void ShowNetworkChatQueryWindow(DestType type, int dest);
|
||||
void ShowJoinStatusWindow();
|
||||
void ShowNetworkGameWindow();
|
||||
|
@ -72,12 +72,6 @@ struct NetworkCompanyStats {
|
||||
|
||||
struct NetworkClientInfo;
|
||||
|
||||
/** The type of password we're asking for. */
|
||||
enum NetworkPasswordType {
|
||||
NETWORK_GAME_PASSWORD, ///< The password of the game.
|
||||
NETWORK_COMPANY_PASSWORD, ///< The password of the company.
|
||||
};
|
||||
|
||||
/**
|
||||
* Destination of our chat messages.
|
||||
* @warning The values of the enum items are part of the admin network API. Only append at the end.
|
||||
|
Loading…
Reference in New Issue
Block a user