Better fix for login screen
This commit is contained in:
parent
6621196266
commit
a3c0254f81
@ -1746,10 +1746,12 @@ int main(int argc, char *argv[] )
|
|||||||
// so we immediately start the main menu (unless it was requested
|
// so we immediately start the main menu (unless it was requested
|
||||||
// to always show the login screen). Otherwise show the login
|
// to always show the login screen). Otherwise show the login
|
||||||
// screen first.
|
// screen first.
|
||||||
MainMenuScreen::getInstance()->push();
|
if(PlayerManager::getCurrentPlayer() && !
|
||||||
|
|
||||||
if (!PlayerManager::getCurrentPlayer() ||
|
|
||||||
UserConfigParams::m_always_show_login_screen)
|
UserConfigParams::m_always_show_login_screen)
|
||||||
|
{
|
||||||
|
MainMenuScreen::getInstance()->push();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
UserScreen::getInstance()->push();
|
UserScreen::getInstance()->push();
|
||||||
// If there is no player, push the RegisterScreen on top of
|
// If there is no player, push the RegisterScreen on top of
|
||||||
|
@ -406,7 +406,14 @@ void BaseUserScreen::eventCallback(Widget* widget,
|
|||||||
*/
|
*/
|
||||||
void BaseUserScreen::closeScreen()
|
void BaseUserScreen::closeScreen()
|
||||||
{
|
{
|
||||||
StateManager::get()->popMenu();
|
if (StateManager::get()->getMenuStackSize() > 1)
|
||||||
|
{
|
||||||
|
StateManager::get()->popMenu();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance());
|
||||||
|
}
|
||||||
} // closeScreen
|
} // closeScreen
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user