Changeset 1747 for code/trunk/src/core/Core.cc
- Timestamp:
- Sep 9, 2008, 4:25:52 AM (17 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core3 (added) merged: 1573-1574,1583-1586,1591-1594,1596-1597,1603,1606-1607,1610-1611,1655,1658,1676-1679,1681-1685,1687,1716-1723,1725-1729,1736
- Property svn:mergeinfo changed
-
code/trunk/src/core/Core.cc
r1535 r1747 96 96 void Core::setConfigValues() 97 97 { 98 SetConfigValue(softDebugLevelConsole_, 3).description("The maximal level of debug output shown in the console"); 99 SetConfigValue(softDebugLevelLogfile_, 3).description("The maximal level of debug output shown in the logfile"); 100 SetConfigValue(softDebugLevelShell_, 1).description("The maximal level of debug output shown in the ingame shell"); 101 98 SetConfigValue(softDebugLevelConsole_, 3).description("The maximal level of debug output shown in the console").callback(this, &Core::debugLevelChanged); 99 SetConfigValue(softDebugLevelLogfile_, 3).description("The maximal level of debug output shown in the logfile").callback(this, &Core::debugLevelChanged); 100 SetConfigValue(softDebugLevelShell_, 1).description("The maximal level of debug output shown in the ingame shell").callback(this, &Core::debugLevelChanged); 101 SetConfigValue(language_, Language::getLanguage().defaultLanguage_).description("The language of the ingame text").callback(this, &Core::languageChanged); 102 } 103 104 /** 105 @brief Callback function if the debug level has changed. 106 */ 107 void Core::debugLevelChanged() 108 { 102 109 // softDebugLevel_ is the maximum of the 3 variables 103 110 this->softDebugLevel_ = this->softDebugLevelConsole_; … … 107 114 this->softDebugLevel_ = this->softDebugLevelShell_; 108 115 109 110 std::string temp = this->language_; 111 SetConfigValue(language_, Language::getLanguage().defaultLanguage_).description("The language of the ingame text"); 112 113 if (this->language_ != temp) 114 { 115 // Read the translation file after the language was configured 116 Language::getLanguage().readTranslatedLanguageFile(); 117 } 116 OutputHandler::setSoftDebugLevel(OutputHandler::LD_All, this->softDebugLevel_); 117 OutputHandler::setSoftDebugLevel(OutputHandler::LD_Console, this->softDebugLevelConsole_); 118 OutputHandler::setSoftDebugLevel(OutputHandler::LD_Logfile, this->softDebugLevelLogfile_); 119 OutputHandler::setSoftDebugLevel(OutputHandler::LD_Shell, this->softDebugLevelShell_); 120 } 121 122 /** 123 @brief Callback function if the language has changed. 124 */ 125 void Core::languageChanged() 126 { 127 // Read the translation file after the language was configured 128 Language::getLanguage().readTranslatedLanguageFile(); 118 129 } 119 130 … … 158 169 else if (device == OutputHandler::LD_Shell) 159 170 Core::getInstance().softDebugLevelShell_ = level; 171 172 OutputHandler::setSoftDebugLevel(device, level); 160 173 } 161 174 } … … 199 212 } 200 213 } 201 202 /**203 @brief Returns the soft debug level, stored in the only existing instance of the DebugLevel class, configured in the config-file.204 @return The soft debug level205 */206 int getSoftDebugLevel()207 {208 return orxonox::Core::getSoftDebugLevel();209 }
Note: See TracChangeset
for help on using the changeset viewer.