diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-10 12:43:56 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-10 12:43:56 -0600 |
commit | e2e30710a646965a506444cc0dc8a91e1a718002 (patch) | |
tree | 6df4da284837593cd11d09aedf5244b244cf6fac | |
parent | 17f9d5abcb05da185486ccfba293f3a8c9eab437 (diff) | |
download | mana-e2e30710a646965a506444cc0dc8a91e1a718002.tar.gz mana-e2e30710a646965a506444cc0dc8a91e1a718002.tar.bz2 mana-e2e30710a646965a506444cc0dc8a91e1a718002.tar.xz mana-e2e30710a646965a506444cc0dc8a91e1a718002.zip |
Remove some SetupWindow weirdness
-rw-r--r-- | src/game.cpp | 2 | ||||
-rw-r--r-- | src/gui/setup.cpp | 10 | ||||
-rw-r--r-- | src/gui/setup.h | 2 | ||||
-rw-r--r-- | src/main.cpp | 3 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/game.cpp b/src/game.cpp index ae708adf..6e513eec 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -121,7 +121,6 @@ NpcListDialog *npcListDialog; NpcTextDialog *npcTextDialog; NpcStringDialog *npcStringDialog; SkillDialog *skillDialog; -Setup* setupWindow; Minimap *minimap; EquipmentWindow *equipmentWindow; TradeWindow *tradeWindow; @@ -261,7 +260,6 @@ void destroyGuiWindows() delete npcTextDialog; delete npcStringDialog; delete skillDialog; - delete setupWindow; delete minimap; delete equipmentWindow; delete tradeWindow; diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 62d79d4d..8062ac06 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -65,10 +65,14 @@ Setup::Setup(): add(btn); // Store this button, as it needs to be enabled/disabled - if (!strcmp(*curBtn, "Reset Windows")) + if (!strcmp(*curBtn, "Reset Windows")) { mResetWindows = btn; + printf("!\n"); + } } + if (mResetWindows) printf("!\n"); + TabbedArea *panel = new TabbedArea; panel->setDimension(gcn::Rectangle(5, 5, width - 10, height - 40)); @@ -146,4 +150,6 @@ void Setup::action(const gcn::ActionEvent &event) void Setup::setInGame(bool inGame) { mResetWindows->setEnabled(inGame); -}
\ No newline at end of file +} + +Setup* setupWindow; diff --git a/src/gui/setup.h b/src/gui/setup.h index 075c88bf..919445b7 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -63,4 +63,6 @@ class Setup : public Window, public gcn::ActionListener gcn::Button *mResetWindows; }; +extern Setup* setupWindow; + #endif diff --git a/src/main.cpp b/src/main.cpp index 06093946..32ff3ac3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -101,8 +101,6 @@ namespace { - Window *setupWindow = 0; - struct SetupListener : public gcn::ActionListener { /** @@ -1031,7 +1029,6 @@ int main(int argc, char *argv[]) progressLabel = NULL; currentDialog = NULL; setup = NULL; - setupWindow = NULL; login_wallpaper->decRef(); login_wallpaper = NULL; |