Fixed #1622 (missing password field in login screen).
This commit is contained in:
parent
eec19b0703
commit
607e94ea84
@ -212,11 +212,15 @@ void BaseUserScreen::makeEntryFieldsVisible()
|
||||
getWidget<LabelWidget>("label_remember")->setVisible(online);
|
||||
getWidget<CheckBoxWidget>("remember-user")->setVisible(online);
|
||||
PlayerProfile *player = getSelectedPlayer();
|
||||
|
||||
// Don't show the password fields if the player wants to be online
|
||||
// and either is the current player (no need to enter a password then)
|
||||
// or has a saved session.
|
||||
// and either is the current player and logged in (no need to enter a
|
||||
// password then) or has a saved session.
|
||||
if(player && online &&
|
||||
(player->hasSavedSession() || player==PlayerManager::getCurrentPlayer()))
|
||||
(player->hasSavedSession() ||
|
||||
(player==PlayerManager::getCurrentPlayer() && player->isLoggedIn() )
|
||||
)
|
||||
)
|
||||
{
|
||||
// If we show the online login fields, but the player has a
|
||||
// saved session, don't show the password field.
|
||||
@ -451,6 +455,7 @@ void BaseUserScreen::onUpdate(float dt)
|
||||
{
|
||||
player->clearSession();
|
||||
makeEntryFieldsVisible();
|
||||
m_username_tb->setText(player->getLastOnlineName());
|
||||
}
|
||||
}
|
||||
} // onUpdate
|
||||
|
Loading…
x
Reference in New Issue
Block a user