From e584bced0e6bc4a824b49120bdf95d1019abc04c Mon Sep 17 00:00:00 2001 From: Benau Date: Sat, 29 Feb 2020 01:26:01 +0800 Subject: [PATCH] Enable iOS server creation --- src/states_screens/online/online_lan.cpp | 13 ------------- src/states_screens/online/online_lan.hpp | 3 --- .../online/online_profile_servers.cpp | 16 ---------------- .../online/online_profile_servers.hpp | 3 --- 4 files changed, 35 deletions(-) diff --git a/src/states_screens/online/online_lan.cpp b/src/states_screens/online/online_lan.cpp index 01f24e6ed..418d61521 100644 --- a/src/states_screens/online/online_lan.cpp +++ b/src/states_screens/online/online_lan.cpp @@ -43,17 +43,6 @@ OnlineLanScreen::OnlineLanScreen() : GUIEngine::Screen("online/lan.stkgui") // ----------------------------------------------------------------------------- -void OnlineLanScreen::beforeAddingWidget() -{ -#ifdef IOS_STK - Widget* w = getWidget("create_lan_server"); - if (w) - w->setVisible(false); -#endif -} // beforeAddingWidget - -// ----------------------------------------------------------------------------- - void OnlineLanScreen::init() { RibbonWidget* ribbon = getWidget("lan"); @@ -81,13 +70,11 @@ void OnlineLanScreen::eventCallback(Widget* widget, const std::string& name, con NetworkConfig::get()->setIsServer(false); ServerSelection::getInstance()->push(); } -#ifndef IOS_STK else if (selection == "create_lan_server") { NetworkConfig::get()->setIsLAN(); CreateServerScreen::getInstance()->push(); } -#endif } } // eventCallback diff --git a/src/states_screens/online/online_lan.hpp b/src/states_screens/online/online_lan.hpp index 9d4952a2e..f96a208c8 100644 --- a/src/states_screens/online/online_lan.hpp +++ b/src/states_screens/online/online_lan.hpp @@ -44,9 +44,6 @@ public: /** \brief implement callback from parent class GUIEngine::Screen */ virtual void loadedFromFile() OVERRIDE {} - /** \brief implement callback from parent class GUIEngine::Screen */ - virtual void beforeAddingWidget() OVERRIDE; - /** \brief implement callback from parent class GUIEngine::Screen */ virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID) OVERRIDE; diff --git a/src/states_screens/online/online_profile_servers.cpp b/src/states_screens/online/online_profile_servers.cpp index 451afa26f..b53435068 100644 --- a/src/states_screens/online/online_profile_servers.cpp +++ b/src/states_screens/online/online_profile_servers.cpp @@ -47,16 +47,6 @@ OnlineProfileServers::OnlineProfileServers() : GUIEngine::Screen("online/profile { } // OnlineProfileServers -// ----------------------------------------------------------------------------- -void OnlineProfileServers::beforeAddingWidget() -{ -#ifdef IOS_STK - Widget* w = getWidget("create_wan_server"); - if (w) - w->setVisible(false); -#endif -} // beforeAddingWidget - // ----------------------------------------------------------------------------- void OnlineProfileServers::init() @@ -65,17 +55,13 @@ void OnlineProfileServers::init() { getWidget("back")->setFocusForPlayer(PLAYER_ID_GAME_MASTER); getWidget("find_wan_server")->setActive(false); -#ifndef IOS_STK getWidget("create_wan_server")->setActive(false); -#endif getWidget("quick_wan_play")->setActive(false); } else { getWidget("find_wan_server")->setActive(true); -#ifndef IOS_STK getWidget("create_wan_server")->setActive(true); -#endif getWidget("quick_wan_play")->setActive(true); RibbonWidget* ribbon = getWidget("wan"); assert(ribbon != NULL); @@ -103,13 +89,11 @@ void OnlineProfileServers::eventCallback(Widget* widget, const std::string& name NetworkConfig::get()->setIsServer(false); ServerSelection::getInstance()->push(); } -#ifndef IOS_STK else if (selection == "create_wan_server") { NetworkConfig::get()->setIsWAN(); CreateServerScreen::getInstance()->push(); } -#endif else if (selection == "quick_wan_play") { NetworkConfig::get()->setIsWAN(); diff --git a/src/states_screens/online/online_profile_servers.hpp b/src/states_screens/online/online_profile_servers.hpp index 5b29e3a1b..ace477afe 100644 --- a/src/states_screens/online/online_profile_servers.hpp +++ b/src/states_screens/online/online_profile_servers.hpp @@ -46,9 +46,6 @@ public: /** \brief implement callback from parent class GUIEngine::Screen */ virtual void loadedFromFile() OVERRIDE {} - /** \brief implement callback from parent class GUIEngine::Screen */ - virtual void beforeAddingWidget() OVERRIDE; - /** \brief implement callback from parent class GUIEngine::Screen */ virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID) OVERRIDE;