diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-21 18:29:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-21 18:29:14 +0300 |
commit | d8bd7fec4c21e4e4b19053153d5e3a271f3e0a42 (patch) | |
tree | 296020411f2ff09e0a10d963f675723927b7118f /src/actions/actions.cpp | |
parent | 818116248c82fb48f8b99d37e896e18609cdd713 (diff) | |
download | plus-d8bd7fec4c21e4e4b19053153d5e3a271f3e0a42.tar.gz plus-d8bd7fec4c21e4e4b19053153d5e3a271f3e0a42.tar.bz2 plus-d8bd7fec4c21e4e4b19053153d5e3a271f3e0a42.tar.xz plus-d8bd7fec4c21e4e4b19053153d5e3a271f3e0a42.zip |
Move windows related actions into separate file.
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r-- | src/actions/actions.cpp | 190 |
1 files changed, 0 insertions, 190 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index d85bbeb78..8e1293856 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -582,24 +582,6 @@ impHandler0(camera) return false; } -impHandler0(setupWindowShow) -{ - if (setupWindow) - { - if (setupWindow->isWindowVisible()) - { - setupWindow->doCancel(); - } - else - { - setupWindow->setVisible(true); - setupWindow->requestMoveToTop(); - } - return true; - } - return false; -} - impHandler0(pickup) { if (localPlayer) @@ -628,178 +610,6 @@ impHandler0(sit) return false; } -impHandler0(hideWindows) -{ - if (setupWindow) - setupWindow->hideWindows(); - return true; -} - -static bool showHelpPage(const std::string &page, const bool showHide) -{ - if (helpWindow) - { - if (showHide && helpWindow->isWindowVisible()) - { - helpWindow->setVisible(false); - } - else - { - helpWindow->loadHelp(page); - helpWindow->requestMoveToTop(); - } - return true; - } - return false; -} - -impHandler0(helpWindowShow) -{ - return showHelpPage("index", true); -} - -impHandler0(aboutWindowShow) -{ - return showHelpPage("about", false); -} - -static void showHideWindow(Window *const window) -{ - if (window) - { - window->setVisible(!window->isWindowVisible()); - if (window->isWindowVisible()) - window->requestMoveToTop(); - } -} - -impHandler0(statusWindowShow) -{ - showHideWindow(statusWindow); - return true; -} - -impHandler0(inventoryWindowShow) -{ - showHideWindow(inventoryWindow); - return true; -} - -impHandler0(equipmentWindowShow) -{ - showHideWindow(equipmentWindow); - return true; -} - -impHandler0(skillDialogShow) -{ - showHideWindow(skillDialog); - return true; -} - -impHandler0(minimapWindowShow) -{ - if (minimap) - { - minimap->toggle(); - return true; - } - return false; -} - -impHandler0(chatWindowShow) -{ - showHideWindow(chatWindow); - return true; -} - -impHandler0(shortcutWindowShow) -{ - showHideWindow(itemShortcutWindow); - return true; -} - -impHandler0(debugWindowShow) -{ - showHideWindow(debugWindow); - return true; -} - -impHandler0(socialWindowShow) -{ - showHideWindow(socialWindow); - return true; -} - -impHandler0(emoteShortcutWindowShow) -{ - showHideWindow(emoteShortcutWindow); - return true; -} - -impHandler0(outfitWindowShow) -{ - showHideWindow(outfitWindow); - return true; -} - -impHandler0(shopWindowShow) -{ - showHideWindow(shopWindow); - return true; -} - -impHandler0(dropShortcutWindowShow) -{ - showHideWindow(dropShortcutWindow); - return true; -} - -impHandler0(killStatsWindowShow) -{ - showHideWindow(killStats); - return true; -} - -impHandler0(spellShortcutWindowShow) -{ - showHideWindow(spellShortcutWindow); - return true; -} - -impHandler0(botcheckerWindowShow) -{ - showHideWindow(botCheckerWindow); - return true; -} - -impHandler0(whoIsOnlineWindowShow) -{ - showHideWindow(whoIsOnline); - return true; -} - -impHandler0(didYouKnowWindowShow) -{ - showHideWindow(didYouKnowWindow); - return true; -} - -impHandler0(questsWindowShow) -{ - showHideWindow(questsWindow); - return true; -} - -impHandler0(updaterWindowShow) -{ - if (updaterWindow) - updaterWindow->deleteSelf(); - else - DialogsManager::createUpdaterWindow(); - return true; -} - impHandler0(changeMapMode) { if (viewport) |