OpenTTD Source: src/network/network_gui.h Source File

OpenTTD Source 14.1

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 <http://www.gnu.org/licenses/>.
6 */
7
10 #ifndef NETWORK_GUI_H
11 #define NETWORK_GUI_H
12
13 #include "../company_type.h"
14 #include "../timer/timer_game_calendar.h"
15 #include "../economy_type.h"
16 #include "../window_type.h"
17 #include "network_type.h"
18 #include "network_gamelist.h"
19
20 void ShowNetworkNeedPassword(NetworkPasswordType npt);
21 void ShowNetworkChatQueryWindow(DestType type, int dest);
22 void ShowJoinStatusWindow();
23 void ShowNetworkGameWindow();
24 void ShowClientList();
25 void ShowNetworkCompanyPasswordWindow(Window *parent);
26 void ShowNetworkAskRelay(const std::string &server_connection_string, const std::string &relay_connection_string, const std::string &token);
27 void ShowNetworkAskSurvey();
28 void ShowSurveyResultTextfileWindow();
29
31 struct NetworkCompanyInfo : NetworkCompanyStats {
32 std::string company_name;
33 TimerGameCalendar::Year inaugurated_year;
34 Money company_value;
35 Money money;
36 Money income;
37 uint16_t performance;
38 bool use_password;
39 std::string clients;
40 };
41
42 enum NetworkRelayWindowCloseData {
43 NRWCD_UNHANDLED = 0,
44 NRWCD_HANDLED = 1,
45 };
46
47 #endif /* NETWORK_GUI_H */
NetworkCompanyStats
Simple calculated statistics of a company.
Definition: network_type.h:67
NetworkCompanyInfo::clients
std::string clients
The clients that control this company (Name1, name2, ..)
Definition: network_gui.h:39
NetworkCompanyInfo::company_value
Money company_value
The company value.
Definition: network_gui.h:34
StrongType::Typedef
Templated helper to make a type-safe 'typedef' representing a single POD value.
Definition: strong_typedef_type.hpp:150
NetworkRelayWindowCloseData
NetworkRelayWindowCloseData
Definition: network_gui.h:42
ShowNetworkChatQueryWindow
void ShowNetworkChatQueryWindow(DestType type, int dest)
Show the chat window.
Definition: network_chat_gui.cpp:522
NetworkCompanyInfo::performance
uint16_t performance
What was his performance last month?
Definition: network_gui.h:37
ShowNetworkAskSurvey
void ShowNetworkAskSurvey()
Show a modal confirmation window with "no" / "preview" / "yes" buttons.
Definition: network_gui.cpp:2566
NetworkCompanyInfo::company_name
std::string company_name
Company name.
Definition: network_gui.h:32
NRWCD_UNHANDLED
@ NRWCD_UNHANDLED
Relay request is unhandled.
Definition: network_gui.h:43
DestType
DestType
Destination of our chat messages.
Definition: network_type.h:91
NetworkPasswordType
NetworkPasswordType
The type of password we're asking for.
Definition: network_type.h:82
NetworkCompanyInfo::money
Money money
The amount of money the company has.
Definition: network_gui.h:35
OverflowSafeInt< int64_t >
ShowNetworkAskRelay
void ShowNetworkAskRelay(const std::string &server_connection_string, const std::string &relay_connection_string, const std::string &token)
Show a modal confirmation window with "no" / "yes, once" / "yes, always" buttons.
Definition: network_gui.cpp:2471
NetworkCompanyInfo::income
Money income
How much did the company earn last year.
Definition: network_gui.h:36
network_gamelist.h
Window
Data structure for an opened window.
Definition: window_gui.h:267
NRWCD_HANDLED
@ NRWCD_HANDLED
Relay request is handled, either by user or by timeout.
Definition: network_gui.h:44
NetworkCompanyInfo
Company information stored at the client side.
Definition: network_gui.h:31
NetworkCompanyInfo::inaugurated_year
TimerGameCalendar::Year inaugurated_year
What year the company started in.
Definition: network_gui.h:33
network_type.h
NetworkCompanyInfo::use_password
bool use_password
Is there a password.
Definition: network_gui.h:38