This commit is contained in:
auria.mg 2018-06-10 18:57:25 -04:00
parent fc89a1c244
commit e9becd283b

View File

@ -108,10 +108,14 @@ void RegisterScreen::init()
local_username->setFocusForPlayer(PLAYER_ID_GAME_MASTER); local_username->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
if (PlayerManager::get()->getNumPlayers() == 0) // The behaviour of the screen is slightly different at startup, i.e.
{ // when it is the first screen: cancel will exit the game, and in
getWidget<IconButtonWidget>("back")->setVisible(false); // this case no 'back' error should be shown.
} bool has_player_profile = (PlayerManager::get()->getNumPlayers() > 0);
getWidget<IconButtonWidget>("back")->setVisible(has_player_profile);
getWidget<IconButtonWidget>("cancel")->setLabel(has_player_profile
? _("Cancel")
: _("Exit game"));
} // init } // init
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------