From 073ac78da73bb2901b48c311a6f8ee7ccca5d294 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 Jan 2015 16:53:39 +0300 Subject: Add chat command for select gm tab. New chat command: /gmtab Alias: /gmchattab --- src/actions/chat.cpp | 7 +++++++ src/actions/chat.h | 1 + src/input/inputaction.h | 1 + src/input/inputactionmap.h | 5 +++++ 4 files changed, 14 insertions(+) (limited to 'src') diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index 336b03065..b18a71218 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -499,4 +499,11 @@ impHandler0(chatLangTab) return true; } +impHandler0(chatGmTab) +{ + if (chatWindow) + chatWindow->selectTabByType(ChatTabType::GM); + return true; +} + } // namespace Actions diff --git a/src/actions/chat.h b/src/actions/chat.h index 980ca0762..b67344c17 100644 --- a/src/actions/chat.h +++ b/src/actions/chat.h @@ -54,6 +54,7 @@ namespace Actions decHandler(chatBattleTab); decHandler(chatTradeTab); decHandler(chatLangTab); + decHandler(chatGmTab); } // namespace Actions #undef decHandler diff --git a/src/input/inputaction.h b/src/input/inputaction.h index e587bf648..f0d444fae 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -531,6 +531,7 @@ namespace InputAction CHAT_BATTLE_TAB, CHAT_TRADE_TAB, CHAT_LANG_TAB, + CHAT_GM_TAB, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index d4e04b9eb..31be925a6 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3949,6 +3949,11 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputCondition::INGAME, "langtab|langchattab", false}, + {"keyGmTab", + defaultAction(&Actions::chatGmTab), + InputCondition::INGAME, + "gmtab|gmchattab", + false}, }; #undef defaultAction -- cgit v1.2.3-70-g09d2