Changeset 3280 for code/trunk/src/orxonox/gui
- Timestamp:
- Jul 12, 2009, 11:58:01 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core4 (added) merged: 3235-3237,3245-3250,3253-3254,3260-3261,3265,3270
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gui/GUIManager.cc
r3196 r3280 53 53 #endif 54 54 55 #include "util/Debug.h" 55 56 #include "util/Exception.h" 57 #include "util/OrxAssert.h" 56 58 #include "core/Core.h" 57 59 #include "core/Clock.h" … … 62 64 namespace orxonox 63 65 { 66 class CEGUILogger : public CEGUI::DefaultLogger 67 { 68 public: 69 void logEvent(const CEGUI::String& message, CEGUI::LoggingLevel level = CEGUI::Standard) 70 { 71 int orxonoxLevel; 72 switch (level) 73 { 74 case CEGUI::Errors: orxonoxLevel = 1; break; 75 case CEGUI::Warnings: orxonoxLevel = 2; break; 76 case CEGUI::Standard: orxonoxLevel = 4; break; 77 case CEGUI::Informative: orxonoxLevel = 5; break; 78 case CEGUI::Insane: orxonoxLevel = 6; break; 79 default: OrxAssert(false, "CEGUI log level out of range, inpect immediately!"); 80 } 81 OutputHandler::getOutStream().setOutputLevel(orxonoxLevel) 82 << "CEGUI: " << message << std::endl; 83 84 CEGUI::DefaultLogger::logEvent(message, level); 85 } 86 }; 87 64 88 static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button); 65 89 GUIManager* GUIManager::singletonRef_s = 0; … … 140 164 141 165 // Create our own logger to specify the filepath 142 this->ceguiLogger_ = new DefaultLogger();166 this->ceguiLogger_ = new CEGUILogger(); 143 167 this->ceguiLogger_->setLogFilename(Core::getLogPathString() + "cegui.log"); 144 168 // set the log level according to ours (translate by subtracting 1) -
code/trunk/src/orxonox/gui/GUIManager.h
r3196 r3280 123 123 CEGUI::ResourceProvider* resourceProvider_; //!< CEGUI's resource provider 124 124 CEGUI::LuaScriptModule* scriptModule_; //!< CEGUI's script module to use Lua 125 CEGUI:: DefaultLogger*ceguiLogger_; //!< CEGUI's logger to be able to log CEGUI errors in our log125 CEGUI::Logger* ceguiLogger_; //!< CEGUI's logger to be able to log CEGUI errors in our log 126 126 CEGUI::System* guiSystem_; //!< CEGUI's main system 127 127 lua_State* luaState_; //!< Lua state, access point to the Lua engine
Note: See TracChangeset
for help on using the changeset viewer.