From be66e6d5b5043383cff10f51bd5a9daa4b9fc113 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 23 Dec 2014 13:30:13 +0300 Subject: Show long key names in browser box. --- src/input/inputmanager.cpp | 10 ++++++++++ src/input/inputmanager.h | 2 ++ 2 files changed, 12 insertions(+) (limited to 'src/input') diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index 0d1d0bdbe..ecf2aac3e 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -447,6 +447,16 @@ std::string InputManager::getKeyValueByName(const std::string &keyName) return getKeyValueString((*it).second); } +std::string InputManager::getKeyValueByNameLong(const std::string &keyName) +{ + const std::map::const_iterator + it = mNameMap.find(keyName); + + if (it == mNameMap.end()) + return std::string(); + return getKeyStringLong((*it).second); +} + void InputManager::addActionKey(const int action, const int type, const int val) { diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h index b91af8882..5f4b7ad6b 100644 --- a/src/input/inputmanager.h +++ b/src/input/inputmanager.h @@ -70,6 +70,8 @@ class InputManager final std::string getKeyValueByName(const std::string &keyName); + std::string getKeyValueByNameLong(const std::string &keyName); + void addActionKey(const int action, const int type, const int val); void setNewKey(const SDL_Event &event, const int type); -- cgit v1.2.3-70-g09d2