summaryrefslogtreecommitdiff
path: root/src/input/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-27 15:14:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-27 15:14:59 +0300
commitfbf45af162f9a2eecd3c27c8729bd9c811dbe793 (patch)
tree9c67b9bbed3f9f34c84d900f3bc7115c2ed1e05b /src/input/inputmanager.cpp
parent45949cf0fbade4f211520926c5e839c68cd01fbb (diff)
downloadmanaplus-fbf45af162f9a2eecd3c27c8729bd9c811dbe793.tar.gz
manaplus-fbf45af162f9a2eecd3c27c8729bd9c811dbe793.tar.bz2
manaplus-fbf45af162f9a2eecd3c27c8729bd9c811dbe793.tar.xz
manaplus-fbf45af162f9a2eecd3c27c8729bd9c811dbe793.zip
Move chat command /enablehightlight into actions.
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r--src/input/inputmanager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 099e2b7fb..3a7f1be9c 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -752,6 +752,22 @@ bool InputManager::executeChatCommand(const std::string &cmd,
return false;
}
+bool InputManager::executeChatCommand(const int keyNum,
+ const std::string &args,
+ ChatTab *const tab)
+{
+ if (keyNum < 0 || keyNum >= InputAction::TOTAL)
+ return false;
+ ActionFuncPtr func = *(inputActionData[keyNum].action);
+ if (func)
+ {
+ InputEvent evt(args, tab, mMask);
+ func(evt);
+ return true;
+ }
+ return false;
+}
+
void InputManager::updateKeyActionMap(KeyToActionMap &actionMap,
KeyToIdMap &idMap,
KeyTimeMap &keyTimeMap,