diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actionmanager.cpp | 28 | ||||
-rw-r--r-- | src/gui/windows/setupwindow.cpp | 11 | ||||
-rw-r--r-- | src/gui/windows/setupwindow.h | 2 |
3 files changed, 14 insertions, 27 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp index 08e88c0fc..567bb0647 100644 --- a/src/actionmanager.cpp +++ b/src/actionmanager.cpp @@ -651,34 +651,8 @@ impHandler0(sit) impHandler0(hideWindows) { - if (statusWindow) - statusWindow->setVisible(false); - if (inventoryWindow) - inventoryWindow->setVisible(false); - if (shopWindow) - shopWindow->setVisible(false); - if (skillDialog) - skillDialog->setVisible(false); if (setupWindow) - setupWindow->setVisible(false); - if (equipmentWindow) - equipmentWindow->setVisible(false); - if (helpWindow) - helpWindow->setVisible(false); - if (debugWindow) - debugWindow->setVisible(false); - if (outfitWindow) - outfitWindow->setVisible(false); - if (dropShortcutWindow) - dropShortcutWindow->setVisible(false); - if (spellShortcutWindow) - spellShortcutWindow->setVisible(false); - if (botCheckerWindow) - botCheckerWindow->setVisible(false); - if (socialWindow) - socialWindow->setVisible(false); - if (questsWindow) - questsWindow->setVisible(false); + setupWindow->hideWindows(); return true; } diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp index 93556ab08..07a4b776a 100644 --- a/src/gui/windows/setupwindow.cpp +++ b/src/gui/windows/setupwindow.cpp @@ -255,6 +255,17 @@ void SetupWindow::unregisterWindowForReset(Window *const window) } } +void SetupWindow::hideWindows() +{ + FOR_EACH (std::list<Window*>::const_iterator, it, mWindowsToReset) + { + Window *const window = *it; + if (window) + window->setVisible(false); + } + setVisible(false); +} + void SetupWindow::doCancel() { setVisible(false); diff --git a/src/gui/windows/setupwindow.h b/src/gui/windows/setupwindow.h index 40e820fcf..d386b365e 100644 --- a/src/gui/windows/setupwindow.h +++ b/src/gui/windows/setupwindow.h @@ -64,6 +64,8 @@ class SetupWindow final : public Window, void unregisterWindowForReset(Window *const window); + void hideWindows(); + void clearWindowsForReset() { mWindowsToReset.clear(); } |