Enable iOS server creation
This commit is contained in:
parent
6630f21295
commit
e584bced0e
@ -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()
|
void OnlineLanScreen::init()
|
||||||
{
|
{
|
||||||
RibbonWidget* ribbon = getWidget<RibbonWidget>("lan");
|
RibbonWidget* ribbon = getWidget<RibbonWidget>("lan");
|
||||||
@ -81,13 +70,11 @@ void OnlineLanScreen::eventCallback(Widget* widget, const std::string& name, con
|
|||||||
NetworkConfig::get()->setIsServer(false);
|
NetworkConfig::get()->setIsServer(false);
|
||||||
ServerSelection::getInstance()->push();
|
ServerSelection::getInstance()->push();
|
||||||
}
|
}
|
||||||
#ifndef IOS_STK
|
|
||||||
else if (selection == "create_lan_server")
|
else if (selection == "create_lan_server")
|
||||||
{
|
{
|
||||||
NetworkConfig::get()->setIsLAN();
|
NetworkConfig::get()->setIsLAN();
|
||||||
CreateServerScreen::getInstance()->push();
|
CreateServerScreen::getInstance()->push();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // eventCallback
|
} // eventCallback
|
||||||
|
@ -44,9 +44,6 @@ public:
|
|||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE {}
|
virtual void loadedFromFile() OVERRIDE {}
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
|
||||||
virtual void beforeAddingWidget() OVERRIDE;
|
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,
|
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,
|
||||||
const int playerID) OVERRIDE;
|
const int playerID) OVERRIDE;
|
||||||
|
@ -47,16 +47,6 @@ OnlineProfileServers::OnlineProfileServers() : GUIEngine::Screen("online/profile
|
|||||||
{
|
{
|
||||||
} // OnlineProfileServers
|
} // OnlineProfileServers
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
void OnlineProfileServers::beforeAddingWidget()
|
|
||||||
{
|
|
||||||
#ifdef IOS_STK
|
|
||||||
Widget* w = getWidget("create_wan_server");
|
|
||||||
if (w)
|
|
||||||
w->setVisible(false);
|
|
||||||
#endif
|
|
||||||
} // beforeAddingWidget
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
void OnlineProfileServers::init()
|
void OnlineProfileServers::init()
|
||||||
@ -65,17 +55,13 @@ void OnlineProfileServers::init()
|
|||||||
{
|
{
|
||||||
getWidget("back")->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
getWidget("back")->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||||
getWidget<IconButtonWidget>("find_wan_server")->setActive(false);
|
getWidget<IconButtonWidget>("find_wan_server")->setActive(false);
|
||||||
#ifndef IOS_STK
|
|
||||||
getWidget<IconButtonWidget>("create_wan_server")->setActive(false);
|
getWidget<IconButtonWidget>("create_wan_server")->setActive(false);
|
||||||
#endif
|
|
||||||
getWidget<IconButtonWidget>("quick_wan_play")->setActive(false);
|
getWidget<IconButtonWidget>("quick_wan_play")->setActive(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getWidget<IconButtonWidget>("find_wan_server")->setActive(true);
|
getWidget<IconButtonWidget>("find_wan_server")->setActive(true);
|
||||||
#ifndef IOS_STK
|
|
||||||
getWidget<IconButtonWidget>("create_wan_server")->setActive(true);
|
getWidget<IconButtonWidget>("create_wan_server")->setActive(true);
|
||||||
#endif
|
|
||||||
getWidget<IconButtonWidget>("quick_wan_play")->setActive(true);
|
getWidget<IconButtonWidget>("quick_wan_play")->setActive(true);
|
||||||
RibbonWidget* ribbon = getWidget<RibbonWidget>("wan");
|
RibbonWidget* ribbon = getWidget<RibbonWidget>("wan");
|
||||||
assert(ribbon != NULL);
|
assert(ribbon != NULL);
|
||||||
@ -103,13 +89,11 @@ void OnlineProfileServers::eventCallback(Widget* widget, const std::string& name
|
|||||||
NetworkConfig::get()->setIsServer(false);
|
NetworkConfig::get()->setIsServer(false);
|
||||||
ServerSelection::getInstance()->push();
|
ServerSelection::getInstance()->push();
|
||||||
}
|
}
|
||||||
#ifndef IOS_STK
|
|
||||||
else if (selection == "create_wan_server")
|
else if (selection == "create_wan_server")
|
||||||
{
|
{
|
||||||
NetworkConfig::get()->setIsWAN();
|
NetworkConfig::get()->setIsWAN();
|
||||||
CreateServerScreen::getInstance()->push();
|
CreateServerScreen::getInstance()->push();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
else if (selection == "quick_wan_play")
|
else if (selection == "quick_wan_play")
|
||||||
{
|
{
|
||||||
NetworkConfig::get()->setIsWAN();
|
NetworkConfig::get()->setIsWAN();
|
||||||
|
@ -46,9 +46,6 @@ public:
|
|||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void loadedFromFile() OVERRIDE {}
|
virtual void loadedFromFile() OVERRIDE {}
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
|
||||||
virtual void beforeAddingWidget() OVERRIDE;
|
|
||||||
|
|
||||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||||
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,
|
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,
|
||||||
const int playerID) OVERRIDE;
|
const int playerID) OVERRIDE;
|
||||||
|
Loading…
Reference in New Issue
Block a user