summaryrefslogtreecommitdiff
path: root/src/gui/login.h
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-10-16 13:42:33 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-10-16 13:42:33 +0000
commit59167f0f02dfd2c8463b2f3d93a8ac219dcc012e (patch)
tree3dd32d4594c1a194c4cc19e1614ea01290417431 /src/gui/login.h
parentd205342bb908207f7921c444e539072e006be241 (diff)
downloadmana-client-59167f0f02dfd2c8463b2f3d93a8ac219dcc012e.tar.gz
mana-client-59167f0f02dfd2c8463b2f3d93a8ac219dcc012e.tar.bz2
mana-client-59167f0f02dfd2c8463b2f3d93a8ac219dcc012e.tar.xz
mana-client-59167f0f02dfd2c8463b2f3d93a8ac219dcc012e.zip
The connection should be non-blocking now and fixed the problem with sound not being played at startup.
Diffstat (limited to 'src/gui/login.h')
-rw-r--r--src/gui/login.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/gui/login.h b/src/gui/login.h
index 5f841d37..ae3e8a0f 100644
--- a/src/gui/login.h
+++ b/src/gui/login.h
@@ -54,6 +54,11 @@ class LoginDialog : public Window, public gcn::ActionListener {
* Called when receiving actions from the widgets.
*/
void action(const std::string& eventId);
+
+ /**
+ * Updates dialog logic.
+ */
+ void logic();
// Made them public to have the possibility to request focus
// from external functions.
@@ -69,6 +74,10 @@ class LoginDialog : public Window, public gcn::ActionListener {
gcn::Button *okButton;
gcn::Button *cancelButton;
gcn::Button *registerButton;
+ int mStatus;
+ bool registration;
+
+ void attemptLogin(const std::string& user, const std::string& pass);
};
/**
@@ -99,22 +108,7 @@ class WrongUsernameNoticeListener : public gcn::ActionListener {
*/
void loginInputHandler(SDL_KeyboardEvent *keyEvent);
-/**
- * Attempt to login to login server
- * Return an error code if any, and then stay at LOGIN state.
- * 0 means ok.
- * 1 means Wrong Password
- * 2 means unregistered ID
- * 3 means rejected from server
- * 4 means blocked by GM Team
- * 5 means expired ID
- * 6 means unable to connect to server
- * 9 means username already existing
- * -1 means unknown error
- */
-int attemptLogin(const std::string& user, const std::string& pass);
-
-enum
+/*enum
{
LOGIN_OK = 0,
LOGIN_WRONG_PASSWORD,
@@ -124,8 +118,9 @@ enum
LOGIN_EXPIRED,
LOGIN_NO_CONNECTION,
LOGIN_USERNAME_TWICE = 9,
+ LOGIN_CONNECTING,
LOGIN_UNKNOWN_ERROR = -1
-};
+};*/
#endif