Move hiding icons for android to beforeAddingWidget

This commit is contained in:
Benau 2018-03-07 11:04:00 +08:00
parent aa06d3f4e2
commit cd713f6c99
4 changed files with 12 additions and 7 deletions

View File

@ -55,12 +55,12 @@ OnlineLanScreen::OnlineLanScreen() : GUIEngine::Screen("online/lan.stkgui")
// -----------------------------------------------------------------------------
void OnlineLanScreen::loadedFromFile()
void OnlineLanScreen::beforeAddingWidget()
{
#ifdef ANDROID
getWidget("create_lan_server")->setVisible(false);
#endif
} // loadedFromFile
} // beforeAddingWidget
// -----------------------------------------------------------------------------

View File

@ -42,7 +42,10 @@ public:
friend class GUIEngine::ScreenSingleton<OnlineLanScreen>;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void loadedFromFile() OVERRIDE;
virtual void loadedFromFile() {}
/** \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,

View File

@ -50,8 +50,7 @@ OnlineProfileServers::OnlineProfileServers() : GUIEngine::Screen("online/profile
} // OnlineProfileServers
// -----------------------------------------------------------------------------
void OnlineProfileServers::loadedFromFile()
void OnlineProfileServers::beforeAddingWidget()
{
if (!PlayerManager::getCurrentOnlineId())
{
@ -62,7 +61,7 @@ void OnlineProfileServers::loadedFromFile()
#ifdef ANDROID
getWidget("create_wan_server")->setVisible(false);
#endif
} // loadedFromFile
} // beforeAddingWidget
// -----------------------------------------------------------------------------

View File

@ -44,7 +44,10 @@ public:
friend class GUIEngine::ScreenSingleton<OnlineProfileServers>;
/** \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 */
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,