Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 2 and Version 3 of code/doc/ConfigValueContainer


Ignore:
Timestamp:
Feb 27, 2008, 8:38:35 PM (17 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/ConfigValueContainer

    v2 v3  
    55The [wiki:ConfigValueContainer] is a class that manages config-values. A config-value is a member-variable of a class that can be changed through the config-file. The config-file is usually ''orxonox.ini''. A new config-value can be defined by using the !SetConfigValue(varname, defvalue) macro (you have to include [wiki:CoreIncludes CoreIncludes.h] to use it), where ''varname'' is a member variable of a class. The macro-call must take place in the setConfigValues() function of this class. This allows the user to change the value of the variable ingame by using console-commands or the menu.
    66
    7 Every config-value has it's own [wiki:ConfigValueContainer]. The container is stored in a map inside the [wiki:Identifier] of the corresponding class. That way it's possible to iterate through all [wiki:ConfigValueContainers] of a class.
     7Every config-value has it's own [wiki:ConfigValueContainer]. The container is stored in a map inside the [wiki:Identifier] of the corresponding class. That way it's possible to iterate through all [wiki:ConfigValueContainer ConfigValueContainers] of a class.
    88
    9 Calling setConfigValues() of an object causes all [wiki:ConfigValueContainers] of it's class to assign the stored values to the variables of the object. The values are initially read from the config-file but can be changed during the game by using console-commands or the menu. It's possible to change variables only temporary without saving the new value in the config-file, but usually changes are saved.
     9Calling setConfigValues() of an object causes all [wiki:ConfigValueContainer ConfigValueContainers] of it's class to assign the stored values to the variables of the object. The values are initially read from the config-file but can be changed during the game by using console-commands or the menu. It's possible to change variables only temporary without saving the new value in the config-file, but usually changes are saved.
    1010
    1111== Functions ==