From 5cbcbbfc0ff1db5cbbe9e187d067e3bd86fcce22 Mon Sep 17 00:00:00 2001
From: Yohann Ferreira <bertram@cegetel.net>
Date: Sat, 29 Jan 2005 22:04:08 +0000
Subject: *** empty log message ***

---
 src/game.cpp            | 7 +++++--
 src/graphic/graphic.cpp | 5 +++++
 src/graphic/graphic.h   | 2 +-
 src/gui/setup.h         | 5 ++---
 4 files changed, 13 insertions(+), 6 deletions(-)

(limited to 'src')

diff --git a/src/game.cpp b/src/game.cpp
index 5cc75fa1..30d91e59 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -30,7 +30,6 @@
 #include "./gui/inventory.h"
 #include "./gui/shop.h"
 #include "./gui/npc.h"
-#include "./gui/setup.h"
 #include "./gui/stats.h"
 #include "./gui/ok_dialog.h"
 #include "./graphic/graphic.h"
@@ -49,7 +48,7 @@ int current_npc, server_tick;
 extern unsigned char screen_mode;
 int fps = 0, frame = 0;
 
-Setup *setup = NULL;
+//Setup *setupWindow = NULL;
 OkDialog *deathNotice = NULL;
 
 #define MAX_TIME 10000
@@ -218,6 +217,10 @@ void do_input()
                     skillDialog->setVisible(!skillDialog->isVisible());
                     used = true;
                 }
+                else if (keysym.sym == SDLK_c) {
+                    setupWindow->setVisible(true);
+                    used = true;
+                }
             }
 
             if (event.key.keysym.sym == SDLK_ESCAPE)
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp
index ec136253..7a1c13dc 100644
--- a/src/graphic/graphic.cpp
+++ b/src/graphic/graphic.cpp
@@ -52,6 +52,7 @@ NpcListDialog *npcListDialog;
 NpcTextDialog *npcTextDialog;
 SkillDialog *skillDialog;
 StatsWindow *statsWindow;
+Setup* setupWindow;
 
 void ChatListener::action(const std::string& eventId)
 {
@@ -262,6 +263,9 @@ Engine::Engine()
     statsWindow = new StatsWindow();
     statsWindow->setVisible(false);
     statsWindow->setPosition(screen->w - 5 - statsWindow->getWidth(), statusWindow->getHeight() + 20);
+    
+    setupWindow = new Setup();
+    setupWindow->setVisible(false);
 
     // Give focus to the chat input
     chatInput->requestFocus();
@@ -299,6 +303,7 @@ Engine::~Engine()
     delete npcTextDialog;
     delete skillDialog;
     delete statsWindow;
+    delete setupWindow;
     
     delete tileset;
     delete monsterset;
diff --git a/src/graphic/graphic.h b/src/graphic/graphic.h
index 9e8fff67..8b4a2bde 100644
--- a/src/graphic/graphic.h
+++ b/src/graphic/graphic.h
@@ -68,7 +68,7 @@ extern NpcListDialog *npcListDialog;
 extern NpcTextDialog *npcTextDialog;
 extern SkillDialog *skillDialog;
 extern StatsWindow *statsWindow;
-//extern Setup *setupWindow;
+extern Setup *setupWindow;
 
 char get_x_offset(char, char);
 char get_y_offset(char, char);
diff --git a/src/gui/setup.h b/src/gui/setup.h
index 0b7e863a..8ada5cce 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -24,8 +24,7 @@
 #ifndef tmw_included_setup_h
 #define tmw_included_setup_h
 
-#include "gui.h"
-#include "../graphic/graphic.h"
+#include "window.h"
 #include "../sound/sound.h"
 
 /**
@@ -76,7 +75,7 @@ class Setup : public Window, public gcn::ActionListener {
         /**
          * Destructor.
          */
-        virtual ~Setup();    
+        ~Setup();    
     
         /**
          * Event handling method.
-- 
cgit v1.2.3-70-g09d2