|
OpenTTD Source 20260421-master-gc2fbc6fdeb
|
GUIs related to networking. More...
#include "../company_type.h"#include "../timer/timer_game_calendar.h"#include "../economy_type.h"#include "../window_type.h"#include "network_type.h"#include "network_gamelist.h"Go to the source code of this file.
Data Structures | |
| struct | NetworkCompanyInfo |
| Company information stored at the client side. More... | |
Enumerations | |
| enum | NetworkRelayWindowCloseData : uint8_t { NRWCD_UNHANDLED = 0 , NRWCD_HANDLED = 1 } |
| Reasons to close the window that opts you in for relaying the network game. More... | |
Functions | |
| void | ShowNetworkNeedPassword (std::shared_ptr< NetworkAuthenticationPasswordRequest > request) |
| Update the NetworkJoinStatusWindow to start requesting the server password. | |
| void | ShowNetworkChatQueryWindow (NetworkChatDestinationType type, int dest) |
| Show the chat window. | |
| void | ShowJoinStatusWindow () |
| Open the window showing the status of joining the server. | |
| void | ShowNetworkGameWindow () |
| Show the server list window. | |
| void | ShowClientList () |
| Open the client list window. | |
| void | ShowNetworkAskRelay (std::string_view server_connection_string, std::string &&relay_connection_string, std::string &&token) |
| Show a modal confirmation window with "no" / "yes, once" / "yes, always" buttons. | |
| void | ShowNetworkAskSurvey () |
| Show a modal confirmation window with "no" / "preview" / "yes" buttons. | |
| void | ShowSurveyResultTextfileWindow (Window *parent) |
| Show the surver results as a text file. | |
GUIs related to networking.
Definition in file network_gui.h.
| enum NetworkRelayWindowCloseData : uint8_t |
Reasons to close the window that opts you in for relaying the network game.
| Enumerator | |
|---|---|
| NRWCD_UNHANDLED | Relay request is unhandled. |
| NRWCD_HANDLED | Relay request is handled, either by user or by timeout. |
Definition at line 43 of file network_gui.h.
| void ShowClientList | ( | ) |
Open the client list window.
Definition at line 2075 of file network_gui.cpp.
References _client_list_desc, and AllocateWindowDescFront().
Referenced by MenuClickCompany(), NetworkOnGameStart(), MainToolbarWindow::OnHotkey(), and ClientNetworkGameSocketHandler::ReceiveServerMapDone().
| void ShowJoinStatusWindow | ( | ) |
Open the window showing the status of joining the server.
Definition at line 2218 of file network_gui.cpp.
References _network_join_status_window_desc, CloseWindowById(), WC_NETWORK_STATUS_WINDOW, and WN_NETWORK_STATUS_WINDOW_JOIN.
Referenced by NetworkClientJoinGame(), and ClientNetworkGameSocketHandler::ReceiveServerMapDone().
| void ShowNetworkAskRelay | ( | std::string_view | server_connection_string, |
| std::string && | relay_connection_string, | ||
| std::string && | token ) |
Show a modal confirmation window with "no" / "yes, once" / "yes, always" buttons.
| server_connection_string | The game server we want to connect to. |
| relay_connection_string | The relay server we want to connect to. |
| token | The token for this connection. |
Definition at line 2345 of file network_gui.cpp.
References _network_ask_relay_desc, CloseWindowByClass(), GetMainWindow(), NRWCD_HANDLED, and WC_NETWORK_ASK_RELAY.
Referenced by ClientNetworkCoordinatorSocketHandler::ReceiveGameCoordinatorTurnConnect().
| void ShowNetworkAskSurvey | ( | ) |
Show a modal confirmation window with "no" / "preview" / "yes" buttons.
Definition at line 2447 of file network_gui.cpp.
References _network_ask_survey_desc, CloseWindowByClass(), GetMainWindow(), NetworkSurveyHandler::IsSurveyPossible(), and WC_NETWORK_ASK_SURVEY.
| void ShowNetworkChatQueryWindow | ( | NetworkChatDestinationType | type, |
| int | dest ) |
Show the chat window.
| type | The type of destination. |
| dest | The actual destination index. |
Definition at line 444 of file network_chat_gui.cpp.
References _chat_window_desc, CloseWindowByClass(), and WC_SEND_NETWORK_MSG.
Referenced by NetworkClientListWindow::OnClickClientChat(), NetworkClientListWindow::OnClickCompanyChat(), and MainWindow::OnHotkey().
| void ShowNetworkGameWindow | ( | ) |
Show the server list window.
Definition at line 962 of file network_gui.cpp.
References _network_game_window_desc, _network_host_list, CloseWindowById(), NetworkAddServer(), WC_NETWORK_WINDOW, and WN_NETWORK_WINDOW_START.
Referenced by NetworkJoinStatusWindow::OnClick(), NetworkStartServerWindow::OnClick(), and SelectGameWindow::OnClick().
| void ShowNetworkNeedPassword | ( | std::shared_ptr< NetworkAuthenticationPasswordRequest > | request | ) |
Update the NetworkJoinStatusWindow to start requesting the server password.
| request | The callback for the reply to the request. |
Definition at line 2228 of file network_gui.cpp.
References CS_ALPHANUMERAL, FindWindowById(), NETWORK_PASSWORD_LENGTH, NetworkJoinStatusWindow::request, ShowQueryString(), WC_NETWORK_STATUS_WINDOW, and WN_NETWORK_STATUS_WINDOW_JOIN.
Referenced by ClientGamePasswordRequestHandler::AskUserForPassword().
| void ShowSurveyResultTextfileWindow | ( | Window * | parent | ) |
Show the surver results as a text file.
| parent | The parent of the text file window. |
Definition at line 2481 of file network_gui.cpp.
References Window::CloseChildWindowById(), TFT_SURVEY_RESULT, and WC_TEXTFILE.
Referenced by GameOptionsWindow::OnClick(), and NetworkAskSurveyWindow::OnClick().