Changeset 11106 for code/trunk
- Timestamp:
- Feb 3, 2016, 1:02:33 PM (9 years ago)
- Location:
- code/trunk/src/libraries/core/input
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/input/KeyBinder.cc
r11083 r11106 324 324 Return the first key name for a specific command 325 325 */ 326 const std::string&KeyBinder::getBinding(const std::string& commandName)326 std::string KeyBinder::getBinding(const std::string& commandName) 327 327 { 328 328 if (this->allCommands_.find(commandName) != this->allCommands_.end()) … … 343 343 The index at which the key name is returned for. 344 344 */ 345 const std::string&KeyBinder::getBinding(const std::string& commandName, unsigned int index)345 std::string KeyBinder::getBinding(const std::string& commandName, unsigned int index) 346 346 { 347 347 if (this->allCommands_.find(commandName) != this->allCommands_.end()) … … 361 361 Return the first key name for a specific command in a human readable form 362 362 */ 363 const std::string&KeyBinder::getBindingReadable(const std::string& commandName)364 { 365 const std::string&binding = this->getBinding(commandName);363 std::string KeyBinder::getBindingReadable(const std::string& commandName) 364 { 365 std::string binding = this->getBinding(commandName); 366 366 367 367 SubString substring = SubString(binding, "."); … … 394 394 return binding; 395 395 396 return *(new std::string(stream.str())); 396 binding = stream.str(); 397 return binding; 397 398 } 398 399 -
code/trunk/src/libraries/core/input/KeyBinder.h
r11071 r11106 66 66 void clearBindings(); 67 67 bool setBinding(const std::string& binding, const std::string& name, bool bTemporary = false); 68 const std::string&getBinding(const std::string& commandName); //tolua_export69 const std::string&getBinding(const std::string& commandName, unsigned int index); //tolua_export70 const std::string&getBindingReadable(const std::string& commandName); //tolua_export68 std::string getBinding(const std::string& commandName); //tolua_export 69 std::string getBinding(const std::string& commandName, unsigned int index); //tolua_export 70 std::string getBindingReadable(const std::string& commandName); //tolua_export 71 71 unsigned int getNumberOfBindings(const std::string& commandName); //tolua_export 72 72
Note: See TracChangeset
for help on using the changeset viewer.