Changeset 6536 for code/trunk/src/libraries/core/input/Button.cc
- Timestamp:
- Mar 16, 2010, 11:22:36 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/gamestate (added) merged: 6430-6432,6437,6439-6440
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/input/Button.cc
r6428 r6536 42 42 #include "core/CommandEvaluation.h" 43 43 #include "core/CommandExecutor.h" 44 #include "core/ConfigFileManager.h" 44 45 45 46 namespace orxonox … … 81 82 } 82 83 83 void Button::readBinding(ConfigFileType type) 84 { 85 const std::string& binding = ConfigFileManager::getInstance().getValue(type, groupName_, name_, "", true); 84 void Button::readBinding(ConfigFile* configFile, ConfigFile* fallbackFile) 85 { 86 std::string binding = configFile->getOrCreateValue(groupName_, name_, "", true); 87 if (binding.empty() && fallbackFile) 88 binding = fallbackFile->getValue(groupName_, name_, true); 86 89 this->parse(binding); 87 90 } 88 91 89 void Button::setBinding(ConfigFile Type type, const std::string& binding, bool bTemporary)92 void Button::setBinding(ConfigFile* configFile, ConfigFile* fallbackFile, const std::string& binding, bool bTemporary) 90 93 { 91 94 if (!bTemporary) 92 ConfigFileManager::getInstance().setValue(type,groupName_, name_, binding, true);95 configFile->setValue(groupName_, name_, binding, true); 93 96 this->parse(binding); 94 97 } … … 103 106 this->bindingString_ = binding; 104 107 105 if (isEmpty(bindingString_) )108 if (isEmpty(bindingString_) || removeTrailingWhitespaces(getLowercase(binding)) == "nobinding") 106 109 return; 107 110
Note: See TracChangeset
for help on using the changeset viewer.