From f842e0b40d8382011f0bc46b1446945d99ac0425 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 14 Jan 2007 14:54:39 +0000 Subject: Upgraded to Guichan 0.6.0 (merge from guichan-0.6.0 branch). --- src/main.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main.cpp') 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: -- cgit v1.2.3-70-g09d2