- Timestamp:
- Jan 1, 2010, 10:05:56 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/src/libraries/core/input/Button.cc
r6432 r6437 82 82 } 83 83 84 void Button::readBinding(ConfigFile* configFile) 85 { 86 const std::string& binding = configFile->getOrCreateValue(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); 87 89 this->parse(binding); 88 90 } 89 91 90 void Button::setBinding(ConfigFile* configFile, const std::string& binding, bool bTemporary)92 void Button::setBinding(ConfigFile* configFile, ConfigFile* fallbackFile, const std::string& binding, bool bTemporary) 91 93 { 92 94 if (!bTemporary) … … 104 106 this->bindingString_ = binding; 105 107 106 if (isEmpty(bindingString_) )108 if (isEmpty(bindingString_) || removeTrailingWhitespaces(getLowercase(binding)) == "nobinding") 107 109 return; 108 110
Note: See TracChangeset
for help on using the changeset viewer.