summaryrefslogtreecommitdiff
path: root/src/input/inputmanager.cpp
diff options
context:
space:
mode:
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 c74544432..235d50da9 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -847,3 +847,19 @@ int InputManager::getActionByKey(const SDL_Event &event) const
}
return InputAction::NO_VALUE;
}
+
+void InputManager::addChatCommands(std::list<std::string> &arr)
+{
+ for (int i = 0; i < InputAction::TOTAL; i++)
+ {
+ const InputActionData &ad = inputActionData[i];
+ std::string cmd = ad.chatCommand;
+ if (!cmd.empty())
+ {
+ cmd = std::string("/").append(cmd);
+ if (ad.useArgs)
+ cmd.append(" ");
+ arr.push_back(cmd);
+ }
+ }
+}