From ab2757fe1ec538809b0bf4ec81a1e51c57b9bee3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 Jan 2015 16:50:20 +0300 Subject: Add chat command for select lang tab. New chat command: /langtab Alias: /langchattab --- 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(+) diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index f59bc9a1b..336b03065 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -492,4 +492,11 @@ impHandler0(chatTradeTab) return true; } +impHandler0(chatLangTab) +{ + if (chatWindow) + chatWindow->selectTabByType(ChatTabType::LANG); + return true; +} + } // namespace Actions diff --git a/src/actions/chat.h b/src/actions/chat.h index dafc853aa..980ca0762 100644 --- a/src/actions/chat.h +++ b/src/actions/chat.h @@ -53,6 +53,7 @@ namespace Actions decHandler(chatDebugTab); decHandler(chatBattleTab); decHandler(chatTradeTab); + decHandler(chatLangTab); } // namespace Actions #undef decHandler diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 9d6f5eb83..e587bf648 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -530,6 +530,7 @@ namespace InputAction CHAT_DEBUG_TAB, CHAT_BATTLE_TAB, CHAT_TRADE_TAB, + CHAT_LANG_TAB, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 1af7f387e..d4e04b9eb 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3944,6 +3944,11 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputCondition::INGAME, "tradetab|tradechattab", false}, + {"keyLangTab", + defaultAction(&Actions::chatLangTab), + InputCondition::INGAME, + "langtab|langchattab", + false}, }; #undef defaultAction -- cgit v1.2.3-70-g09d2