Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2008, 4:25:52 AM (16 years ago)
Author:
landauf
Message:

merged core3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/input/KeyBinder.cc

    r1567 r1747  
    3636#include <string>
    3737#include "util/Convert.h"
    38 #include "core/Debug.h"
     38#include "util/Debug.h"
    3939#include "core/ConfigValueIncludes.h"
    4040#include "core/CoreIncludes.h"
     
    216216    if (!infile)
    217217    {
    218       ConfigFileManager::getSingleton()->setFile(CFT_Keybindings, "def_keybindings.ini");
    219       ConfigFileManager::getSingleton()->save(CFT_Keybindings, "keybindings.ini");
     218      ConfigFileManager::getInstance()->setFile(CFT_Keybindings, "def_keybindings.ini");
     219      ConfigFileManager::getInstance()->save(CFT_Keybindings, "keybindings.ini");
    220220    }
    221221    else
    222222      infile.close();
    223     ConfigFileManager::getSingleton()->setFile(CFT_Keybindings, "keybindings.ini");
     223    ConfigFileManager::getInstance()->setFile(CFT_Keybindings, "keybindings.ini");
    224224
    225225    // parse key bindings
     
    234234  void KeyBinder::setConfigValues()
    235235  {
    236     SetConfigValueGeneric(KeyBinder, analogThreshold_, 0.05f)  .description("Threshold for analog axes until which the state is 0.");
    237     SetConfigValueGeneric(KeyBinder, mouseSensitivity_, 1.0f)  .description("Mouse sensitivity.");
    238     SetConfigValueGeneric(KeyBinder, bDeriveMouseInput_, false).description("Whether or not to derive moues movement for the absolute value.");
    239     SetConfigValueGeneric(KeyBinder, derivePeriod_, 0.05f).description("Accuracy of the mouse input deriver. The higher the more precise, but laggier.");
    240     SetConfigValueGeneric(KeyBinder, mouseSensitivityDerived_, 1.0f).description("Mouse sensitivity if mouse input is derived.");
    241     SetConfigValueGeneric(KeyBinder, bClipMouse_, true).description("Whether or not to clip absolute value of mouse in non derive mode.");
     236    SetConfigValue(analogThreshold_, 0.05f)  .description("Threshold for analog axes until which the state is 0.");
     237    SetConfigValue(mouseSensitivity_, 1.0f)  .description("Mouse sensitivity.");
     238    SetConfigValue(bDeriveMouseInput_, false).description("Whether or not to derive moues movement for the absolute value.");
     239    SetConfigValue(derivePeriod_, 0.05f).description("Accuracy of the mouse input deriver. The higher the more precise, but laggier.");
     240    SetConfigValue(mouseSensitivityDerived_, 1.0f).description("Mouse sensitivity if mouse input is derived.");
     241    SetConfigValue(bClipMouse_, true).description("Whether or not to clip absolute value of mouse in non derive mode.");
    242242
    243243    float oldThresh = buttonThreshold_;
    244     SetConfigValueGeneric(KeyBinder, buttonThreshold_, 0.80f).description("Threshold for analog axes until which the button is not pressed.");
     244    SetConfigValue(buttonThreshold_, 0.80f).description("Threshold for analog axes until which the button is not pressed.");
    245245    if (oldThresh != buttonThreshold_)
    246246      for (unsigned int i = 0; i < nHalfAxes_s; i++)
     
    268268    if (!cont)
    269269    {
    270       cont = new ConfigValueContainer(CFT_Keybindings, ClassIdentifier<KeyBinder>::getIdentifier(), button.name_, "");
     270      cont = new ConfigValueContainer(CFT_Keybindings, ClassIdentifier<KeyBinder>::getIdentifier(), button.name_, "", button.name_);
    271271      ClassIdentifier<KeyBinder>::getIdentifier()->addConfigValueContainer(button.name_, cont);
    272272    }
    273273    std::string old = button.bindingString_;
    274     cont->getValue(&button.bindingString_);
     274    cont->getValue(&button.bindingString_, this);
    275275
    276276    // keybinder stuff
Note: See TracChangeset for help on using the changeset viewer.