diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-27 15:14:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-27 15:14:59 +0300 |
commit | fbf45af162f9a2eecd3c27c8729bd9c811dbe793 (patch) | |
tree | 9c67b9bbed3f9f34c84d900f3bc7115c2ed1e05b /src/input/inputmanager.cpp | |
parent | 45949cf0fbade4f211520926c5e839c68cd01fbb (diff) | |
download | plus-fbf45af162f9a2eecd3c27c8729bd9c811dbe793.tar.gz plus-fbf45af162f9a2eecd3c27c8729bd9c811dbe793.tar.bz2 plus-fbf45af162f9a2eecd3c27c8729bd9c811dbe793.tar.xz plus-fbf45af162f9a2eecd3c27c8729bd9c811dbe793.zip |
Move chat command /enablehightlight into actions.
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r-- | src/input/inputmanager.cpp | 16 |
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, |