MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ShowNetworkGameWindow

Function ShowNetworkGameWindow

src/network/network_gui.cpp:941–956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

939);
940
941void ShowNetworkGameWindow()
942{
943 static bool first = true;
944 CloseWindowById(WC_NETWORK_WINDOW, WN_NETWORK_WINDOW_START);
945
946 /* Only show once */
947 if (first) {
948 first = false;
949 /* Add all servers from the config file to our list. */
950 for (const auto &iter : _network_host_list) {
951 NetworkAddServer(iter);
952 }
953 }
954
955 new NetworkGameWindow(_network_game_window_desc);
956}
957
958struct NetworkStartServerWindow : public Window {
959 WidgetID widget_id{}; ///< The widget that has the pop-up input menu

Callers 3

OnClickMethod · 0.85
OnClickMethod · 0.85
OnClickMethod · 0.85

Calls 2

CloseWindowByIdFunction · 0.85
NetworkAddServerFunction · 0.85

Tested by

no test coverage detected