diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-17 23:21:20 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-17 23:21:20 +0000 |
commit | 11e9c220d8b989d9ee9abb27c8d0acc41fe3d7f4 (patch) | |
tree | 304bebd799fcb1052f1b452e8f9da255cd718242 /src/gui/login.cpp | |
parent | bc4c1e72374a44595e8b1ea0cd16e182139b2cb7 (diff) | |
download | mana-11e9c220d8b989d9ee9abb27c8d0acc41fe3d7f4.tar.gz mana-11e9c220d8b989d9ee9abb27c8d0acc41fe3d7f4.tar.bz2 mana-11e9c220d8b989d9ee9abb27c8d0acc41fe3d7f4.tar.xz mana-11e9c220d8b989d9ee9abb27c8d0acc41fe3d7f4.zip |
Made some fixes to the window widget and made server selection use it too.
WARNING: From now on we need Guichan 0.2.0, the 0.1.0 version will NOT work!
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); |