diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-24 16:24:43 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-24 16:24:43 +0000 |
commit | bfbb797e6c528e0650826e917d498c52362abbb0 (patch) | |
tree | 8d111b92eefe8451a66b57599217829b4127318e /src/gui/login.h | |
parent | dae5c721bf974792db526f1d736384d95a75635e (diff) | |
download | mana-bfbb797e6c528e0650826e917d498c52362abbb0.tar.gz mana-bfbb797e6c528e0650826e917d498c52362abbb0.tar.bz2 mana-bfbb797e6c528e0650826e917d498c52362abbb0.tar.xz mana-bfbb797e6c528e0650826e917d498c52362abbb0.zip |
Merged 0.0 changes from revision 3177 to 3234 to trunk.
Diffstat (limited to 'src/gui/login.h')
-rw-r--r-- | src/gui/login.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/gui/login.h b/src/gui/login.h index 05c0da31..d8ae7eaf 100644 --- a/src/gui/login.h +++ b/src/gui/login.h @@ -26,6 +26,7 @@ #include <iosfwd> #include <guichan/actionlistener.hpp> +#include <guichan/keylistener.hpp> #include "window.h" #include "../guichanfwd.h" @@ -33,22 +34,13 @@ class LoginData; /** - * Listener used for handling wrong data. - */ -class WrongDataNoticeListener : public gcn::ActionListener { - public: - void setTarget(gcn::TextField *textField); - void action(const gcn::ActionEvent &event); - private: - gcn::TextField *mTarget; -}; - -/** * The login dialog. * * \ingroup Interface */ -class LoginDialog : public Window, public gcn::ActionListener { +class LoginDialog : public Window, public gcn::ActionListener, + public gcn::KeyListener +{ public: /** * Constructor @@ -67,7 +59,19 @@ class LoginDialog : public Window, public gcn::ActionListener { */ void action(const gcn::ActionEvent &event); + /** + * Called when a key is pressed in one of the text fields. + */ + void keyPressed(gcn::KeyEvent &keyEvent); + private: + /** + * Returns whether submit can be enabled. This is true in the login + * state, when all necessary fields have some text. + */ + bool + canSubmit(); + gcn::TextField *mUserField; gcn::TextField *mPassField; gcn::CheckBox *mKeepCheck; @@ -75,8 +79,6 @@ class LoginDialog : public Window, public gcn::ActionListener { gcn::Button *mCancelButton; gcn::Button *mRegisterButton; - WrongDataNoticeListener *mWrongDataNoticeListener; - LoginData *mLoginData; }; |