summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-11 15:56:29 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-11 15:56:29 +0300
commitca108c26aa632e54993c11861442800277efa45d (patch)
tree2c17e4ed6803b1d72b628d374186068981a7995c /src
parentdb5ac7e5ac2642a2df29dcd6de3d6fba5a964b47 (diff)
downloadmanaverse-ca108c26aa632e54993c11861442800277efa45d.tar.gz
manaverse-ca108c26aa632e54993c11861442800277efa45d.tar.bz2
manaverse-ca108c26aa632e54993c11861442800277efa45d.tar.xz
manaverse-ca108c26aa632e54993c11861442800277efa45d.zip
Add chat command for select trade tab.
New chat command: /tradetab Alias: /tradechattab
Diffstat (limited to 'src')
-rw-r--r--src/actions/chat.cpp7
-rw-r--r--src/actions/chat.h1
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h5
4 files changed, 14 insertions, 0 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index ce54b72db..f59bc9a1b 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -485,4 +485,11 @@ impHandler0(chatBattleTab)
return true;
}
+impHandler0(chatTradeTab)
+{
+ if (chatWindow)
+ chatWindow->selectTabByType(ChatTabType::TRADE);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/chat.h b/src/actions/chat.h
index b53b069b3..dafc853aa 100644
--- a/src/actions/chat.h
+++ b/src/actions/chat.h
@@ -52,6 +52,7 @@ namespace Actions
decHandler(chatGeneralTab);
decHandler(chatDebugTab);
decHandler(chatBattleTab);
+ decHandler(chatTradeTab);
} // namespace Actions
#undef decHandler
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 9417a472c..9d6f5eb83 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -529,6 +529,7 @@ namespace InputAction
CHAT_GENERAL_TAB,
CHAT_DEBUG_TAB,
CHAT_BATTLE_TAB,
+ CHAT_TRADE_TAB,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index d0a4ecc1a..1af7f387e 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3939,6 +3939,11 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputCondition::INGAME,
"battletab|battlechattab",
false},
+ {"keyTradeTab",
+ defaultAction(&Actions::chatTradeTab),
+ InputCondition::INGAME,
+ "tradetab|tradechattab",
+ false},
};
#undef defaultAction