summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-16 15:55:33 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-16 15:55:33 +0000
commit5f6a6445d0156cb9728878688e09884b6a2b0188 (patch)
tree00259b472eb01869222107c38c279dc510c86481 /src/engine.cpp
parent57b3e0e1f0b835ff2982e9f66c7af402caecd3c1 (diff)
downloadmana-5f6a6445d0156cb9728878688e09884b6a2b0188.tar.gz
mana-5f6a6445d0156cb9728878688e09884b6a2b0188.tar.bz2
mana-5f6a6445d0156cb9728878688e09884b6a2b0188.tar.xz
mana-5f6a6445d0156cb9728878688e09884b6a2b0188.zip
Made a dialog from exit confirmation.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index f01a19ed..adda6d06 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -65,25 +65,9 @@ EquipmentWindow *equipmentWindow;
ChargeDialog *chargeDialog;
TradeWindow *tradeWindow;
RequestTradeDialog *requestTradeDialog;
-ConfirmDialog *quitDialog;
BuddyWindow *buddyWindow;
std::map<int, Spriteset*> monsterset;
-/**
- * Listener used for exitting handling.
- */
-class ExitListener : public gcn::ActionListener {
- void action(const std::string &eventId) {
- if (eventId == "yes") {
- state = EXIT;
- }
- else
- {
- quitDialog->setVisible(false);
- }
- }
-} exitListener;
-
char hairtable[16][4][2] = {
// S(x,y) W(x,y) N(x,y) E(x,y)
{ { 0, 0}, {-1, 2}, {-1, 2}, { 0, 2} }, // STAND
@@ -181,8 +165,7 @@ Engine::Engine()
tradeWindow = new TradeWindow();
buddyWindow = new BuddyWindow();
requestTradeDialog = new RequestTradeDialog();
- quitDialog = new ConfirmDialog("Quit", "Are you sure you want to quit ?",
- (gcn::ActionListener*)&exitListener);
+
// Initialize window posisitons
chatWindow->setPosition(0, screen->h - chatWindow->getHeight());
statusWindow->setPosition(screen->w - statusWindow->getWidth() - 5, 5);
@@ -226,7 +209,7 @@ Engine::Engine()
tradeWindow->setVisible(false);
buddyWindow->setVisible(false);
requestTradeDialog->setVisible(false);
- quitDialog->setVisible(false);
+
// Do not focus any text field
gui->focusNone();
@@ -272,7 +255,6 @@ Engine::~Engine()
delete tradeWindow;
delete buddyWindow;
delete requestTradeDialog;
- delete quitDialog;
// Delete sprite sets
//delete monsterset;