Changeset 8798 for code/branches/output/src/libraries/core/GUIManager.cc
- Timestamp:
- Jul 30, 2011, 3:55:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/core/GUIManager.cc
r8796 r8798 33 33 #include <memory> 34 34 #include <boost/bind.hpp> 35 #include <boost/preprocessor/stringize.hpp>36 35 #include <OgreRenderQueue.h> 37 36 #include <OgreRenderWindow.h> … … 93 92 namespace orxonox 94 93 { 94 namespace context 95 { 96 namespace 97 { 98 REGISTER_OUTPUT_CONTEXT(cegui); 99 } 100 } 101 95 102 static void key_esc() 96 103 { GUIManager::getInstance().keyESC(); } … … 107 114 case CEGUI::Errors: orxonoxLevel = level::internal_error; break; 108 115 case CEGUI::Warnings: orxonoxLevel = level::internal_warning; break; 109 case CEGUI::Standard: orxonoxLevel = level:: internal_status; break;110 case CEGUI::Informative: orxonoxLevel = level:: internal_info; break;111 case CEGUI::Insane: orxonoxLevel = level::verbose ; break;116 case CEGUI::Standard: orxonoxLevel = level::verbose; break; 117 case CEGUI::Informative: orxonoxLevel = level::verbose_more; break; 118 case CEGUI::Insane: orxonoxLevel = level::verbose_ultra; break; 112 119 default: OrxAssert(false, "CEGUI log level out of range, inspect immediately!"); 113 120 } 114 121 115 #pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: use correct level (and remove boost include)") 116 orxout(debug_output, context::cegui) << "CEGUI (level: " << level << "): " << message << endl; 122 orxout(orxonoxLevel, context::cegui) << message << endl; 117 123 118 124 CEGUI::DefaultLogger::logEvent(message, level); … … 302 308 std::auto_ptr<CEGUILogger> ceguiLogger(new CEGUILogger()); 303 309 ceguiLogger->setLogFilename(PathConfig::getLogPathString() + "cegui.log"); 304 #pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: inspect this (and remove boost include)") 305 // // Set the log level according to ours (translate by subtracting 1) 306 // ceguiLogger->setLoggingLevel( 307 // static_cast<LoggingLevel>(OutputHandler::getInstance().getSoftDebugLevel("logFile") - 1)); 310 ceguiLogger->setLoggingLevel(static_cast<CEGUI::LoggingLevel>(this->outputLevelCeguiLog_)); 308 311 this->ceguiLogger_ = ceguiLogger.release(); 309 312 … … 363 366 void GUIManager::setConfigValues(void) 364 367 { 365 SetConfigValue(guiScheme_, GUIManager::defaultScheme_) .description("Changes the current GUI scheme.").callback(this, &GUIManager::changedGUIScheme);368 SetConfigValue(guiScheme_, GUIManager::defaultScheme_).description("Changes the current GUI scheme.").callback(this, &GUIManager::changedGUIScheme); 366 369 SetConfigValue(numScrollLines_, 1).description("How many lines to scroll in a list if the scroll wheel is used"); 370 SetConfigValueExternal(outputLevelCeguiLog_, "OutputHandler", "outputLevelCeguiLog", CEGUI::Standard).description("The log level of the CEGUI log file").callback(this, &GUIManager::changedCeguiOutputLevel); 367 371 } 368 372 369 373 void GUIManager::changedGUIScheme(void) 370 374 { 375 } 376 377 void GUIManager::changedCeguiOutputLevel() 378 { 379 if (this->ceguiLogger_) 380 this->ceguiLogger_->setLoggingLevel(static_cast<CEGUI::LoggingLevel>(this->outputLevelCeguiLog_)); 371 381 } 372 382
Note: See TracChangeset
for help on using the changeset viewer.