Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 16, 2010, 10:56:26 PM (14 years ago)
Author:
landauf
Message:

added new macro to ConfigValueIncludes.h, "SetConfigValueExternal" for values with user-defined name AND user-defined section

added new config value for models to enable/disable LOD (aimed towards people which experience crashes when using LOD)
moved config value for the LOD of ParticleInterface to the same section (GraphicsSettings) using the new macro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/ConfigValueIncludes.h

    r6536 r7166  
    9696    orxonox::setConfigValueGeneric(this, &variable, ConfigFileType::Settings, this->getIdentifier()->getName(), entryName, defaultValue)
    9797
     98/** Sets a runtime configurable value (simplified macro version of setConfigValueGeneric)
     99    If the container for the value doesn't yet exist, a new one is created.
     100    Also, the @a varname argument will be modified and set to the new value (default or from ini file).
     101@param variable
     102    Variable name as C++ identifier.
     103@param sectionName
     104    Name of the section in the ini file (e.g. [MySection])
     105@param entryName
     106    Name of the entry in the ini file (e.g. [MySection] myValue)
     107@param defaultValue
     108    Value to be used if it cannot be read from the ini file
     109*/
     110#define SetConfigValueExternal(variable, sectionName, entryName, defaultValue) \
     111    orxonox::setConfigValueGeneric(this, &variable, ConfigFileType::Settings, sectionName, entryName, defaultValue)
     112
    98113
    99114namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.