summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-14 14:54:39 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-14 14:54:39 +0000
commitf842e0b40d8382011f0bc46b1446945d99ac0425 (patch)
tree5ddbb7c146a8ece28a4260d788350b1c2cf0dbed /src/main.cpp
parentcbbcc5489e2f72a76b66ae849cbe8f1dc44246ca (diff)
downloadMana-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.gz
Mana-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.bz2
Mana-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.xz
Mana-f842e0b40d8382011f0bc46b1446945d99ac0425.zip
Upgraded to Guichan 0.6.0 (merge from guichan-0.6.0 branch).
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1a171d84..8c70d62f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -103,7 +103,10 @@ Logger *logger; /**< Log object */
namespace {
struct ErrorListener : public gcn::ActionListener
{
- void action(const std::string& eventId, gcn::Widget* widget) { state = LOGIN_STATE; }
+ void action(const gcn::ActionEvent &event)
+ {
+ state = LOGIN_STATE;
+ }
} errorListener;
}
@@ -642,8 +645,8 @@ int main(int argc, char *argv[])
logger->log("State: CHAR_SERVER");
currentDialog = new ServerSelectDialog(&loginData);
if (options.chooseDefault || options.playername != "") {
- ((ServerSelectDialog*)currentDialog)->action("ok",
- NULL);
+ ((ServerSelectDialog*) currentDialog)->action(
+ gcn::ActionEvent(NULL, "ok"));
}
break;
@@ -652,15 +655,16 @@ int main(int argc, char *argv[])
currentDialog = new CharSelectDialog(network, &charInfo,
1 - loginData.sex);
- if (((CharSelectDialog*)currentDialog)->
+ if (((CharSelectDialog*) currentDialog)->
selectByName(options.playername))
options.chooseDefault = true;
else
- ((CharSelectDialog*)currentDialog)->selectByName(
+ ((CharSelectDialog*) currentDialog)->selectByName(
config.getValue("lastCharacter", ""));
if (options.chooseDefault)
- ((CharSelectDialog*)currentDialog)->action("ok", NULL);
+ ((CharSelectDialog*) currentDialog)->action(
+ gcn::ActionEvent(NULL, "ok"));
break;
case GAME_STATE: