summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-23 18:00:53 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-23 18:00:53 +0300
commit663b79fd68f9e7f578415f3d0f015a3d8ba998cb (patch)
treefc1064bf86303f12a2d8cfeb91004364a480b0de /src/actions
parent16faca9102b7f6771fb0745d5b4bc694f966fca4 (diff)
downloadmanaplus-663b79fd68f9e7f578415f3d0f015a3d8ba998cb.tar.gz
manaplus-663b79fd68f9e7f578415f3d0f015a3d8ba998cb.tar.bz2
manaplus-663b79fd68f9e7f578415f3d0f015a3d8ba998cb.tar.xz
manaplus-663b79fd68f9e7f578415f3d0f015a3d8ba998cb.zip
Move chat command /help into actions.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/windows.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp
index 7e5b31858..f2fcfa85a 100644
--- a/src/actions/windows.cpp
+++ b/src/actions/windows.cpp
@@ -67,6 +67,7 @@
#include "gui/windows/updaterwindow.h"
#include "gui/widgets/tabs/chattab.h"
+#include "gui/widgets/tabs/chattabtype.h"
#include "render/graphics.h"
@@ -132,7 +133,19 @@ static bool showHelpPage(const std::string &page, const bool showHide)
impHandler0(helpWindowShow)
{
- return showHelpPage("index", true);
+ if (!chatWindow || !chatWindow->isInputFocused())
+ return showHelpPage("index", true);
+ if (!event.tab)
+ return showHelpPage("chatcommands", true);
+ switch (event.tab->getType())
+ {
+ case ChatTabType::PARTY:
+ return showHelpPage("chatparty", true);
+ case ChatTabType::GUILD:
+ return showHelpPage("chatguild", true);
+ default:
+ return showHelpPage("chatcommands", true);
+ }
}
impHandler0(aboutWindowShow)