From 663b79fd68f9e7f578415f3d0f015a3d8ba998cb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 23 Aug 2014 18:00:53 +0300 Subject: Move chat command /help into actions. --- src/actions/windows.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/actions/windows.cpp') 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) -- cgit v1.2.3-60-g2f50