diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/graphic/graphic.h | 2 | ||||
-rw-r--r-- | src/gui/setup.cpp | 12 | ||||
-rw-r--r-- | src/gui/setup.h | 13 |
3 files changed, 6 insertions, 21 deletions
diff --git a/src/graphic/graphic.h b/src/graphic/graphic.h index 22388fc6..8b4a2bde 100644 --- a/src/graphic/graphic.h +++ b/src/graphic/graphic.h @@ -41,6 +41,7 @@ class Graphics; #include "../gui/status.h" #include "../gui/stats.h" #include "../gui/skill.h" +#include "../gui/setup.h" #include "../resources/resourcemanager.h" #include "spriteset.h" #include <SDL.h> @@ -67,6 +68,7 @@ extern NpcListDialog *npcListDialog; extern NpcTextDialog *npcTextDialog; extern SkillDialog *skillDialog; extern StatsWindow *statsWindow; +extern Setup *setupWindow; char get_x_offset(char, char); char get_y_offset(char, char); diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index bfb619c2..6610314e 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -175,15 +175,3 @@ void Setup::action(const std::string& eventId) setVisible(false); } } - -Setup *Setup::ptr = NULL; -Setup *Setup::create_setup() { - if (ptr == NULL) { - ptr = new Setup(); - } - else { - ptr->setVisible(true); - } - - return ptr; -} diff --git a/src/gui/setup.h b/src/gui/setup.h index 20540aa2..0b7e863a 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -65,9 +65,9 @@ class Setup : public Window, public gcn::ActionListener { gcn::Button *applyButton; gcn::Button *cancelButton; - // Setup dialog - static Setup *ptr; + public: + /** * Constructor. */ @@ -76,18 +76,13 @@ class Setup : public Window, public gcn::ActionListener { /** * Destructor. */ - virtual ~Setup(); - - public: + virtual ~Setup(); + /** * Event handling method. */ void action(const std::string& eventId); - /** - * Static method for creating singleton object. - */ - static Setup *create_setup(); }; #endif |