summaryrefslogtreecommitdiff
path: root/src/gui/login.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-09-26 17:24:37 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-09-26 17:24:37 +0000
commita0fd39a05151848bef85e18e25aa0824bc9cef93 (patch)
tree60f9ed2136268d7570b4716a318e510b2c30d2ce /src/gui/login.cpp
parent1a7f56901301fb8fe08f26526f3314b0974626ca (diff)
downloadmana-client-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.gz
mana-client-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.bz2
mana-client-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.xz
mana-client-a0fd39a05151848bef85e18e25aa0824bc9cef93.zip
Added a nicer handling of when you get disconnected from the server.
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r--src/gui/login.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index f5dc4f1e..83a20f8b 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -240,7 +240,7 @@ void LoginDialog::action(const std::string& eventId)
}
else if (eventId == "cancel")
{
- state = EXIT;
+ state = EXIT_STATE;
}
else if (eventId == "register")
{
@@ -315,7 +315,7 @@ void loginInputHandler(SDL_KeyboardEvent *keyEvent)
{
if (keyEvent->keysym.sym == SDLK_ESCAPE)
{
- state = EXIT;
+ state = EXIT_STATE;
}
}
@@ -329,7 +329,7 @@ int attemptLogin(const std::string& user, const std::string& pass)
(short)config.getValue("port", 0));
if (ret == -1) {
- state = LOGIN;
+ state = LOGIN_STATE;
wrongLoginNotice = new OkDialog("Error",
"Unable to connect to login server");
return LOGIN_NO_CONNECTION;
@@ -378,7 +378,7 @@ int attemptLogin(const std::string& user, const std::string& pass)
server_info[i]->port);
}
- state = CHAR_SERVER;
+ state = CHAR_SERVER_STATE;
skip(msg.getLength());
ret = LOGIN_OK;
@@ -409,11 +409,11 @@ int attemptLogin(const std::string& user, const std::string& pass)
break;
}
skip(msg.getLength());
- state = LOGIN;
+ state = LOGIN_STATE;
}
else {
skip(msg.getLength());
- state = LOGIN;
+ state = LOGIN_STATE;
ret = LOGIN_UNKNOWN_ERROR;
}
// Todo: add other packets, also encrypted