From db5ac7e5ac2642a2df29dcd6de3d6fba5a964b47 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 Jan 2015 15:52:55 +0300 Subject: Add chat command for select battle tab. New chat command: /battletab Alias: /battlechattab --- 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 0e719fb75..ce54b72db 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -478,4 +478,11 @@ impHandler0(chatDebugTab) return true; } +impHandler0(chatBattleTab) +{ + if (chatWindow) + chatWindow->selectTabByType(ChatTabType::BATTLE); + return true; +} + } // namespace Actions diff --git a/src/actions/chat.h b/src/actions/chat.h index 6f6708a99..b53b069b3 100644 --- a/src/actions/chat.h +++ b/src/actions/chat.h @@ -51,6 +51,7 @@ namespace Actions decHandler(clearChat); decHandler(chatGeneralTab); decHandler(chatDebugTab); + decHandler(chatBattleTab); } // namespace Actions #undef decHandler diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 80190ff56..9417a472c 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -528,6 +528,7 @@ namespace InputAction PET_AI_STOP, CHAT_GENERAL_TAB, CHAT_DEBUG_TAB, + CHAT_BATTLE_TAB, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 691870011..d0a4ecc1a 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3934,6 +3934,11 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputCondition::INGAME, "debugtab|debugchattab", false}, + {"keyBattleTab", + defaultAction(&Actions::chatBattleTab), + InputCondition::INGAME, + "battletab|battlechattab", + false}, }; #undef defaultAction -- cgit v1.2.3-70-g09d2