Fix broken user creation since PR #4563

This commit is contained in:
Benau
2021-08-06 12:46:45 +08:00
parent bc667d3b36
commit bc43eee98c
2 changed files with 7 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<stkgui>
<div x="1%" y="1%" width="98%" height="98%" layout="vertical-row" >
<header align="center" height="8%" width="80%" text="Create User" text_align="center"
<header id="create_user" align="center" height="8%" width="80%" text="Create User" text_align="center"
I18N="In the registration dialog" />
<spacer height="1%" width="10"/>

View File

@@ -67,6 +67,11 @@ RegisterScreen::RegisterScreen() : Screen("online/register.stkgui")
// -----------------------------------------------------------------------------
void RegisterScreen::init()
{
if (m_existing_player)
getWidget("create_user")->setText(_("Rename"));
else
getWidget("create_user")->setText(_("Create User"));
getWidget<TextBoxWidget>("username")->setText(L"");
m_info_widget = getWidget<LabelWidget>("info");
assert(m_info_widget);
@@ -314,7 +319,7 @@ void RegisterScreen::doRegister()
StateManager::get()->popMenu();
return;
}
else if(m_existing_player && m_account_mode==ACCOUNT_OFFLINE)
else if(m_account_mode==ACCOUNT_OFFLINE)
{
m_existing_player = NULL;
StateManager::get()->popMenu();