summaryrefslogtreecommitdiff
path: root/src/gui/setup.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-07-23 10:24:29 -0600
committerJared Adams <jaxad0127@gmail.com>2009-07-23 10:31:36 -0600
commit01263d9ebb304d9fba90d741bf849e0865e3c17d (patch)
tree584bda0e0ec4a37b8fe911c6539ac29d54761f94 /src/gui/setup.cpp
parent69db63d2537b959a3a994fd77ae0d630126fe7e5 (diff)
downloadmana-01263d9ebb304d9fba90d741bf849e0865e3c17d.tar.gz
mana-01263d9ebb304d9fba90d741bf849e0865e3c17d.tar.bz2
mana-01263d9ebb304d9fba90d741bf849e0865e3c17d.tar.xz
mana-01263d9ebb304d9fba90d741bf849e0865e3c17d.zip
Clear some more support ifdefs
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r--src/gui/setup.cpp55
1 files changed, 10 insertions, 45 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index aebcf61b..2f0d78ca 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -37,29 +37,7 @@
#include "utils/dtor.h"
#include "utils/gettext.h"
-extern Window *chatWindow;
extern Window *statusWindow;
-extern Window *buyDialog;
-extern Window *sellDialog;
-extern Window *buySellDialog;
-extern Window *inventoryWindow;
-extern Window *npcTextDialog;
-extern Window *npcStringDialog;
-extern Window *skillDialog;
-extern Window *partyWindow;
-extern Window *minimap;
-extern Window *equipmentWindow;
-extern Window *tradeWindow;
-extern Window *helpWindow;
-extern Window *debugWindow;
-extern Window *itemShortcutWindow;
-extern Window *emoteShortcutWindow;
-#ifdef TMWSERV_SUPPORT
-extern Window *magicDialog;
-extern Window *guildWindow;
-#else
-extern Window *storageWindow;
-#endif
Setup::Setup():
Window(_("Setup"))
@@ -137,29 +115,11 @@ void Setup::action(const gcn::ActionEvent &event)
if (!statusWindow)
return;
- chatWindow->resetToDefaultSize();
- statusWindow->resetToDefaultSize();
- buyDialog->resetToDefaultSize();
- sellDialog->resetToDefaultSize();
-#ifdef EATHENA_SUPPORT
- buySellDialog->resetToDefaultSize();
-#endif
- inventoryWindow->resetToDefaultSize();
- skillDialog->resetToDefaultSize();
- partyWindow->resetToDefaultSize();
- minimap->resetToDefaultSize();
- equipmentWindow->resetToDefaultSize();
- tradeWindow->resetToDefaultSize();
- helpWindow->resetToDefaultSize();
- debugWindow->resetToDefaultSize();
- itemShortcutWindow->resetToDefaultSize();
- emoteShortcutWindow->resetToDefaultSize();
-#ifdef TMWSERV_SUPPORT
- magicDialog->resetToDefaultSize();
- guildWindow->resetToDefaultSize();
-#else
- storageWindow->resetToDefaultSize();
-#endif
+ for (std::list<Window*>::iterator it = mWindowsToReset.begin();
+ it != mWindowsToReset.end(); it++)
+ {
+ (*it)->resetToDefaultSize();
+ }
}
}
@@ -168,4 +128,9 @@ void Setup::setInGame(bool inGame)
mResetWindows->setEnabled(inGame);
}
+void Setup::registerWindowForReset(Window *window)
+{
+ mWindowsToReset.push_back(window);
+}
+
Setup *setupWindow;