From e9becd283b73827d64e585cdde07f530501d7fd5 Mon Sep 17 00:00:00 2001 From: "auria.mg" Date: Sun, 10 Jun 2018 18:57:25 -0400 Subject: [PATCH] More on #3242 --- src/states_screens/register_screen.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/states_screens/register_screen.cpp b/src/states_screens/register_screen.cpp index 06cf2f360..bf0805663 100644 --- a/src/states_screens/register_screen.cpp +++ b/src/states_screens/register_screen.cpp @@ -108,10 +108,14 @@ void RegisterScreen::init() local_username->setFocusForPlayer(PLAYER_ID_GAME_MASTER); - if (PlayerManager::get()->getNumPlayers() == 0) - { - getWidget("back")->setVisible(false); - } + // 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 + // this case no 'back' error should be shown. + bool has_player_profile = (PlayerManager::get()->getNumPlayers() > 0); + getWidget("back")->setVisible(has_player_profile); + getWidget("cancel")->setLabel(has_player_profile + ? _("Cancel") + : _("Exit game")); } // init // -----------------------------------------------------------------------------