From 4b891f50dfc89318321eeac176415d1bef61aca6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 16 Oct 2014 01:04:04 +0300 Subject: Add bank window (hercules only). also add banklistener to get changed bank balance. --- src/actions/windows.cpp | 12 ++++++++++++ src/actions/windows.h | 1 + 2 files changed, 13 insertions(+) (limited to 'src/actions') diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp index fae82261c..18a2c4773 100644 --- a/src/actions/windows.cpp +++ b/src/actions/windows.cpp @@ -24,6 +24,7 @@ #include "gui/dialogsmanager.h" +#include "gui/windows/bankwindow.h" #include "gui/windows/skilldialog.h" #include "gui/windows/socialwindow.h" #include "gui/windows/statuswindow.h" @@ -47,6 +48,8 @@ #include "gui/widgets/tabs/chat/chattab.h" #include "gui/widgets/tabs/chat/chattabtype.h" +#include "net/serverfeatures.h" + #include "debug.h" extern ShortcutWindow *spellShortcutWindow; @@ -247,6 +250,15 @@ impHandler0(questsWindowShow) return true; } +impHandler0(bankWindowShow) +{ + if (!serverFeatures->haveBankApi()) + return false; + + showHideWindow(bankWindow); + return true; +} + impHandler0(updaterWindowShow) { if (updaterWindow) diff --git a/src/actions/windows.h b/src/actions/windows.h index 1c8293334..dab926416 100644 --- a/src/actions/windows.h +++ b/src/actions/windows.h @@ -51,6 +51,7 @@ namespace Actions decHandler(didYouKnowWindowShow); decHandler(questsWindowShow); decHandler(updaterWindowShow); + decHandler(bankWindowShow); } // namespace Actions #undef decHandler -- cgit v1.2.3-70-g09d2