Changeset 8798 for code/branches
- Timestamp:
- Jul 30, 2011, 3:55:35 PM (13 years ago)
- Location:
- code/branches/output/src/libraries
- Files:
-
- 5 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 -
code/branches/output/src/libraries/core/GUIManager.h
r8729 r8798 152 152 bool protectedCall(FunctionType function); 153 153 154 void changedCeguiOutputLevel(); 155 154 156 // keyHandler functions 155 157 void buttonPressed (const KeyEvent& evt); … … 168 170 169 171 #ifdef ORXONOX_OLD_CEGUI 170 CEGUI::OgreCEGUIRenderer* guiRenderer_; //!< CEGUI's interface to the Ogre Engine171 CEGUI::ResourceProvider* resourceProvider_; //!< CEGUI's resource provider172 CEGUI::OgreCEGUIRenderer* guiRenderer_; //!< CEGUI's interface to the Ogre Engine 173 CEGUI::ResourceProvider* resourceProvider_; //!< CEGUI's resource provider 172 174 #else 173 CEGUI::OgreRenderer* guiRenderer_; //!< CEGUI's interface to the Ogre Engine174 CEGUI::OgreResourceProvider* resourceProvider_; //!< CEGUI's resource provider175 Ogre::RenderQueueListener* rqListener_; //!< RQ listener so we can draw UNDER Ogre overlays175 CEGUI::OgreRenderer* guiRenderer_; //!< CEGUI's interface to the Ogre Engine 176 CEGUI::OgreResourceProvider* resourceProvider_; //!< CEGUI's resource provider 177 Ogre::RenderQueueListener* rqListener_; //!< RQ listener so we can draw UNDER Ogre overlays 176 178 CEGUI::OgreImageCodec* imageCodec_; 177 179 #endif 178 LuaState* luaState_; //!< LuaState, access point to the Lua engine 179 CEGUI::LuaScriptModule* scriptModule_; //!< CEGUI's script module to use Lua 180 CEGUI::System* guiSystem_; //!< CEGUI's main system 181 shared_ptr<ResourceInfo> rootFileInfo_; //!< Resource information about the root script 182 CEGUI::Logger* ceguiLogger_; //!< CEGUI's logger to be able to log CEGUI errors in our log 183 CEGUI::Window* rootWindow_; //!< Root node for all windows 184 CEGUI::Window* hudRootWindow_; //!< Root node for the HUD sheets 185 CEGUI::Window* menuRootWindow_; //!< Root node for the menu sheets (used by Lua) 186 std::map<std::string, PlayerInfo*> players_; //!< Stores the player (owner) for each GUI 187 Ogre::Camera* camera_; //!< Camera used to render the scene with the GUI 180 LuaState* luaState_; //!< LuaState, access point to the Lua engine 181 CEGUI::LuaScriptModule* scriptModule_; //!< CEGUI's script module to use Lua 182 CEGUI::System* guiSystem_; //!< CEGUI's main system 183 shared_ptr<ResourceInfo> rootFileInfo_; //!< Resource information about the root script 184 CEGUI::Logger* ceguiLogger_; //!< CEGUI's logger to be able to log CEGUI errors in our log 185 int outputLevelCeguiLog_; //!< CEGUI's log level 186 CEGUI::Window* rootWindow_; //!< Root node for all windows 187 CEGUI::Window* hudRootWindow_; //!< Root node for the HUD sheets 188 CEGUI::Window* menuRootWindow_; //!< Root node for the menu sheets (used by Lua) 189 std::map<std::string, PlayerInfo*> players_; //!< Stores the player (owner) for each GUI 190 Ogre::Camera* camera_; //!< Camera used to render the scene with the GUI 188 191 189 192 /// Helper object that executes the surrogate destructor destroy() 190 193 DestructionHelper<GUIManager> destructionHelper_; 191 194 192 static GUIManager* singletonPtr_s; //!< Singleton reference to GUIManager195 static GUIManager* singletonPtr_s; //!< Singleton reference to GUIManager 193 196 194 197 // The used CEGUI scheme. … … 196 199 std::string guiScheme_; 197 200 bool oldCEGUI_; 198 201 199 202 int numScrollLines_; ///< How many lines to scroll in a list if the scroll wheel is used 200 203 -
code/branches/output/src/libraries/core/GraphicsManager.cc
r8796 r8798 35 35 #include <boost/filesystem.hpp> 36 36 #include <boost/shared_array.hpp> 37 #include <boost/preprocessor/stringize.hpp>38 37 39 38 #include <OgreFrameListener.h> … … 69 68 namespace orxonox 70 69 { 70 namespace context 71 { 72 namespace 73 { 74 REGISTER_OUTPUT_CONTEXT(ogre); 75 } 76 } 77 71 78 static const std::string __CC_GraphicsManager_group = "GraphicsManager"; 72 79 static const std::string __CC_setScreenResolution_name = "setScreenResolution"; … … 159 166 SetConfigValue(ogreLogFile_, "ogre.log") 160 167 .description("Logfile for messages from Ogre. Use \"\" to suppress log file creation."); 161 SetConfigValue(ogreLogLevelTrivial_ , 5)162 .description("Corresponding orxonox debug level for ogre Trivial");163 SetConfigValue(ogreLogLevelNormal_ , 4)164 .description("Corresponding orxonox debug level for ogre Normal");165 SetConfigValue(ogreLogLevelCritical_, 2)166 .description("Corresponding orxonox debug level for ogre Critical");167 168 } 168 169 … … 410 411 { 411 412 case Ogre::LML_TRIVIAL: 412 orxonoxLevel = this->ogreLogLevelTrivial_;413 orxonoxLevel = level::verbose_more; 413 414 break; 414 415 case Ogre::LML_NORMAL: 415 orxonoxLevel = this->ogreLogLevelNormal_;416 orxonoxLevel = level::verbose; 416 417 break; 417 418 case Ogre::LML_CRITICAL: 418 orxonoxLevel = this->ogreLogLevelCritical_;419 orxonoxLevel = level::internal_warning; 419 420 break; 420 421 default: … … 423 424 introduction = "Ogre: "; 424 425 } 425 #pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: use correct level, also for config values (and remove boost include)") 426 orxout( debug_output, context::ogre) << "ogre (level: " << lml << "): "<< introduction << message << endl;426 427 orxout(orxonoxLevel, context::ogre) << introduction << message << endl; 427 428 } 428 429 -
code/branches/output/src/libraries/core/GraphicsManager.h
r8706 r8798 134 134 std::string ogrePlugins_; //!< Comma separated list of all plugins to load 135 135 std::string ogreLogFile_; //!< log filename for Ogre log messages 136 int ogreLogLevelTrivial_; //!< Corresponding Orxonox debug level for LL_TRIVIAL137 int ogreLogLevelNormal_; //!< Corresponding Orxonox debug level for LL_NORMAL138 int ogreLogLevelCritical_; //!< Corresponding Orxonox debug level for LL_CRITICAL139 136 140 137 /// Helper object that executes the surrogate destructor destroy() -
code/branches/output/src/libraries/util/output/OutputDefinitions.h
r8796 r8798 75 75 REGISTER_OUTPUT_CONTEXT(test2); 76 76 REGISTER_OUTPUT_CONTEXT(output); 77 REGISTER_OUTPUT_CONTEXT(cegui);78 REGISTER_OUTPUT_CONTEXT(ogre);79 77 REGISTER_OUTPUT_CONTEXT(lua); 80 78 REGISTER_OUTPUT_CONTEXT(tcl);
Note: See TracChangeset
for help on using the changeset viewer.