diff options
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r-- | src/gui/login.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 0a8c19a7..2250f59b 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -71,7 +71,7 @@ void LoginActionListener::action(const std::string& eventId) */ void login() { // Create dialog - dialog = new WindowContainer(); + dialog = new Window("Login"); userLabel = new gcn::Label("Name:"); passLabel = new gcn::Label("Password:"); userField = new gcn::TextField("player"); @@ -114,15 +114,16 @@ void login() { guiTop->add(dialog); + userField->requestFocus(); + userField->setCaretPosition(userField->getText().length()); + if (get_config_int("login", "remember", 0)) { if (get_config_string("login", "username", 0)) { userField->setText(get_config_string("login", "username", "")); + passField->requestFocus(); } } - userField->requestFocus(); - userField->setCaretPosition(userField->getText().length()); - while (state == LOGIN) { clear_bitmap(buffer); blit((BITMAP *)graphic[LOGIN_BMP].dat, buffer, 0, 0, 0, 0, 800, 600); |