diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-08-24 20:02:36 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-08-24 20:02:36 +0000 |
commit | 276ce34d9646305c58ca7ce51cc9f1d53b60a24f (patch) | |
tree | 57eec04d3e64109361151056d8dc70c25f508d8e /src/gui/login.h | |
parent | 4683edefdede2f482cc43c4fb516dba9ce50318c (diff) | |
download | mana-276ce34d9646305c58ca7ce51cc9f1d53b60a24f.tar.gz mana-276ce34d9646305c58ca7ce51cc9f1d53b60a24f.tar.bz2 mana-276ce34d9646305c58ca7ce51cc9f1d53b60a24f.tar.xz mana-276ce34d9646305c58ca7ce51cc9f1d53b60a24f.zip |
Simply don't show equipped items in sell dialog since it's annoying. Code cleanups and improvements to the login sequence.
Diffstat (limited to 'src/gui/login.h')
-rw-r--r-- | src/gui/login.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/gui/login.h b/src/gui/login.h index 002004c4..1322a1c3 100644 --- a/src/gui/login.h +++ b/src/gui/login.h @@ -25,11 +25,9 @@ #define _TMW_LOGIN_H #include <iosfwd> - #include <guichan/actionlistener.hpp> #include "window.h" - #include "../guichanfwd.h" /** @@ -56,12 +54,15 @@ class LoginDialog : public Window, public gcn::ActionListener { */ void action(const std::string& eventId); + // Made them public to have the possibility to request focus + // from external functions. + gcn::TextField *userField; + gcn::TextField *passField; + private: gcn::Label *userLabel; gcn::Label *passLabel; gcn::Label *serverLabel; - gcn::TextField *userField; - gcn::TextField *passField; gcn::TextField *serverField; gcn::CheckBox *keepCheck; gcn::Button *okButton; @@ -70,6 +71,23 @@ class LoginDialog : public Window, public gcn::ActionListener { }; /** + * Listener used for handling wrong password. + */ +class WrongPasswordNoticeListener : public gcn::ActionListener { + public: + void action(const std::string &eventId); +}; + +/** + * Listener used for handling wrong username. + */ +class WrongUsernameNoticeListener : public gcn::ActionListener { + public: + void action(const std::string &eventId); +}; + + +/** * Display login dialog */ void login(); @@ -87,6 +105,8 @@ void login(); * 9 means username already existing * -1 means unknown error */ +int attemptLogin(const std::string& user, const std::string& pass); + enum { LOGIN_OK = 0, @@ -101,6 +121,4 @@ enum }; -int server_login(const std::string& user, const std::string& pass); - #endif |