summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp
index de8a3ea2..b3fa6f07 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -60,6 +60,7 @@
#include "gui/ministatus.h"
#include "gui/npclistdialog.h"
#include "gui/npc_text.h"
+#include "gui/ok_dialog.h"
#include "gui/sell.h"
#include "gui/setup.h"
#include "gui/skill.h"
@@ -97,6 +98,7 @@ Joystick *joystick = NULL;
extern Window *weightNotice;
extern Window *deathNotice;
ConfirmDialog *exitConfirm = NULL;
+OkDialog *disconnectedDialog = NULL;
ChatWindow *chatWindow;
MenuWindow *menuWindow;
@@ -134,7 +136,7 @@ namespace {
{
void action(const gcn::ActionEvent &event)
{
- if (event.getId() == "yes") {
+ if (event.getId() == "yes" || event.getId() == "ok") {
done = true;
}
exitConfirm = NULL;
@@ -420,15 +422,15 @@ void Game::logic()
if (!mNetwork->isConnected())
{
- if (!exitConfirm)
+ if (!disconnectedDialog)
{
- exitConfirm = new
- ConfirmDialog("Network Error",
- "There was a network error, the program will now quit");
- exitConfirm->addActionListener(&exitListener);
+ disconnectedDialog = new
+ OkDialog("Network Error",
+ "The connection to the server was lost, the program will now quit");
+ disconnectedDialog->addActionListener(&exitListener);
}
- exitConfirm->requestMoveToTop();
+ disconnectedDialog->requestMoveToTop();
}
}
}