Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 28, 2009, 11:10:37 PM (14 years ago)
Author:
rgrieder
Message:

Changed config value handling in the KeyBinder. Doesn't change the interface though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/input/KeyBinder.cc

    r6422 r6428  
    5757        RegisterRootObject(KeyBinder);
    5858
    59         // intialise all buttons and half axes to avoid creating everything with 'new'
     59        // initialise all buttons and half axes to avoid creating everything with 'new'
    6060        // keys
    6161        for (unsigned int i = 0; i < KeyCode::numberOfKeys; i++)
     
    168168            {
    169169                for (unsigned int i = 0; i < JoyStickButtonCode::numberOfButtons; ++i)
    170                     (*joyStickButtons_[iDev])[i].readConfigValue(this->configFile_);
     170                    (*joyStickButtons_[iDev])[i].readBinding(this->configFile_);
    171171                for (unsigned int i = 0; i < JoyStickAxisCode::numberOfAxes * 2; ++i)
    172                     (*joyStickAxes_[iDev])[i].readConfigValue(this->configFile_);
     172                    (*joyStickAxes_[iDev])[i].readBinding(this->configFile_);
    173173            }
    174174        }
     
    257257        for (std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)
    258258        {
    259             it->second->readConfigValue(this->configFile_);
     259            it->second->readBinding(this->configFile_);
    260260            addButtonToCommand(it->second->bindingString_, it->second);
    261261        }
     
    270270        {
    271271            addButtonToCommand(binding, it->second);
    272             if (bTemporary)
    273                 it->second->configContainer_->tset(binding);
    274             else
    275                 it->second->configContainer_->set(binding);
    276             it->second->configContainer_->getValue(&(it->second->bindingString_), it->second);
     272            it->second->setBinding(this->configFile_, binding, bTemporary);
    277273            return true;
    278274        }
Note: See TracChangeset for help on using the changeset viewer.