From 6ad0ab8123de1ee3f27ad38300dc7ef896bab569 Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Fri, 18 Dec 2009 21:43:53 +0100 Subject: Client now returns to server selection after server disconnection This resolves http://bugs.manasource.org/view.php?id=37 --- src/main.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 0f070dd1..8caef783 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -82,8 +82,6 @@ #include -#include - #include #include @@ -128,6 +126,7 @@ Game *game = 0; State state = STATE_START; std::string errorMessage; +ErrorListener errorListener; Sound sound; Music *bgm; @@ -649,15 +648,6 @@ static void loadUpdates() } } -class ErrorListener : public gcn::ActionListener -{ -public: - void action(const gcn::ActionEvent &event) - { - state = STATE_CHOOSE_SERVER; - } -} errorListener; - class AccountListener : public gcn::ActionListener { public: @@ -678,6 +668,11 @@ public: } // namespace +void ErrorListener::action(const gcn::ActionEvent &event) +{ + state = STATE_CHOOSE_SERVER; +} + const std::string &getHomeDirectory() { return homeDir; -- cgit v1.2.3-60-g2f50