Changeset 8519 for code/branches/unity_build
- Timestamp:
- May 20, 2011, 5:27:39 AM (14 years ago)
- Location:
- code/branches/unity_build/src/libraries/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/unity_build/src/libraries/core/Core.cc
r8518 r8519 267 267 268 268 SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun()) 269 .description("Developer mode. If not set, hides some things from the user to not confuse him."); 269 .description("Developer mode. If not set, hides some things from the user to not confuse him.") 270 .callback(this, &Core::devModeChanged); 270 271 SetConfigValue(language_, Language::getInstance().defaultLanguage_) 271 272 .description("The language of the in game text") … … 282 283 } 283 284 285 /** Callback function for changes in the dev mode that affect debug levels. 286 The function behaves according to these rules: 287 - 'normal' mode is defined based on where the program was launched: if 288 the launch path was the build directory, development mode \c on is 289 normal, otherwise normal means development mode \c off. 290 - Debug levels should not be hard configured (\c config instead of 291 \c tconfig) in non 'normal' mode to avoid strange behaviour. 292 - Changing the development mode from 'normal' to the other state will 293 immediately change the debug levels to predefined values which can be 294 reconfigured with \c tconfig. 295 */ 296 void Core::devModeChanged() 297 { 298 bool isNormal = (bDevMode_ == PathConfig::buildDirectoryRun()); 299 if (isNormal) 300 { 301 ModifyConfigValue(debugLevelLogFile_, update); 302 ModifyConfigValue(debugLevelIOConsole_, update); 303 ModifyConfigValue(debugLevelInGameConsole_, update); 304 } 305 else 306 { 307 DefaultLogLevels::List levels = (bDevMode_ ? DefaultLogLevels::Dev : DefaultLogLevels::User); 308 ModifyConfigValue(debugLevelLogFile_, tset, levels.logFile); 309 ModifyConfigValue(debugLevelIOConsole_, tset, levels.ioConsole); 310 ModifyConfigValue(debugLevelInGameConsole_, tset, levels.inGameConsole); 311 } 312 } 313 284 314 //! Callback function if the language has changed. 285 315 void Core::languageChanged() -
code/branches/unity_build/src/libraries/core/Core.h
r8518 r8519 101 101 Core(const Core&); //!< Don't use (undefined symbol) 102 102 103 void devModeChanged(); 103 104 void languageChanged(); 104 105 void initRandomNumberGenerator();
Note: See TracChangeset
for help on using the changeset viewer.