OpenTTD Source 20260421-master-gc2fbc6fdeb
network_gui.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * 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 <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef NETWORK_GUI_H
11#define NETWORK_GUI_H
12
13#include "../company_type.h"
15#include "../economy_type.h"
16#include "../window_type.h"
17#include "network_type.h"
18#include "network_gamelist.h"
19
21void ShowNetworkNeedPassword(std::shared_ptr<NetworkAuthenticationPasswordRequest> request);
25void ShowClientList();
26void ShowNetworkAskRelay(std::string_view server_connection_string, std::string &&relay_connection_string, std::string &&token);
29
41
47
48#endif /* NETWORK_GUI_H */
Callback interface for requests for passwords in the context of network authentication.
StrongType::Typedef< int32_t, struct YearTag< struct Calendar >, StrongType::Compare, StrongType::Integer > Year
Types related to companies.
Types related to the economy.
Handling of the list of games.
NetworkRelayWindowCloseData
Reasons to close the window that opts you in for relaying the network game.
Definition network_gui.h:43
@ NRWCD_UNHANDLED
Relay request is unhandled.
Definition network_gui.h:44
@ NRWCD_HANDLED
Relay request is handled, either by user or by timeout.
Definition network_gui.h:45
void ShowNetworkGameWindow()
Show the server list window.
void ShowJoinStatusWindow()
Open the window showing the status of joining the server.
void ShowSurveyResultTextfileWindow(Window *parent)
Show the surver results as a text file.
void ShowNetworkChatQueryWindow(NetworkChatDestinationType type, int dest)
Show the chat 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 ShowNetworkNeedPassword(std::shared_ptr< NetworkAuthenticationPasswordRequest > request)
Update the NetworkJoinStatusWindow to start requesting the server password.
Types used for networking.
NetworkChatDestinationType
Destination of our chat messages.
Company information stored at the client side.
Definition network_gui.h:31
Money money
The amount of money the company has.
Definition network_gui.h:35
std::string clients
The clients that control this company (Name1, name2, ..).
Definition network_gui.h:39
uint16_t performance
What was his performance last month?
Definition network_gui.h:37
TimerGameCalendar::Year inaugurated_year
What year the company started in.
Definition network_gui.h:33
bool use_password
Is there a password.
Definition network_gui.h:38
std::string company_name
Company name.
Definition network_gui.h:32
Money company_value
The company value.
Definition network_gui.h:34
Money income
How much did the company earn last year.
Definition network_gui.h:36
Simple calculated statistics of a company.
Data structure for an opened window.
Definition window_gui.h:274
Definition of the game-calendar-timer.
Types related to windows.