Changeset 2710 for code/trunk/src/orxonox/gui
- Timestamp:
- Feb 28, 2009, 7:46:37 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 6 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore deleted
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gui/CMakeLists.txt
r2131 r2710 1 SET(SRC_FILES1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 2 GUIManager.cc 3 OgreCEGUIRenderer.cpp4 OgreCEGUIResourceProvider.cpp5 OgreCEGUITexture.cpp6 3 ) 7 8 ADD_SOURCE_FILES(SRC_FILES) -
code/trunk/src/orxonox/gui/GUIManager.cc
r2662 r2710 36 36 #include "GUIManager.h" 37 37 38 #include <boost/filesystem.hpp> 38 39 #include <OgreRenderWindow.h> 39 40 #include <OgreRoot.h> 40 41 #include <CEGUI.h> 41 #include "ceguilua/CEGUILua.h" 42 #include <CEGUIDefaultLogger.h> 43 #include <ogreceguirenderer/OgreCEGUIRenderer.h> 44 #include "SpecialConfig.h" // Configures the macro below 45 #ifdef CEGUILUA_USE_INTERNAL_LIBRARY 46 # include <ceguilua/CEGUILua.h> 47 #else 48 # include <CEGUILua.h> 49 #endif 50 42 51 #include "util/Exception.h" 43 52 #include "core/input/InputManager.h" 44 53 #include "core/input/SimpleInputState.h" 45 #include "core/tolua/tolua_bind.h"46 54 #include "core/ConsoleCommand.h" 47 55 #include "core/Core.h" 48 #include "tolua/tolua_bind.h" 49 #include "OgreCEGUIRenderer.h" 50 51 #include "lua/lua.hpp" 56 #include "ToluaBindCore.h" 57 #include "ToluaBindOrxonox.h" 58 59 extern "C" { 60 #include <lua.h> 61 } 52 62 53 63 namespace orxonox … … 100 110 lua_pushnil(luaState_); 101 111 lua_setglobal(luaState_, "Core"); 102 // TODO: deleting the script module fails an assert ation.112 // TODO: deleting the script module fails an assertion. 103 113 // However there is not much we can do about it since it occurs too when 104 114 // we don't open Core or Orxonox. Might be a CEGUI issue. … … 141 151 this->luaState_ = this->scriptModule_->getLuaState(); 142 152 153 // Create our own logger to specify the filepath 154 boost::filesystem::path ceguiLogFilepath(Core::getLogPath() / "cegui.log"); 155 this->ceguiLogger_ = new DefaultLogger(); 156 this->ceguiLogger_->setLogFilename(ceguiLogFilepath.file_string()); 157 // set the log level according to ours (translate by subtracting 1) 158 this->ceguiLogger_->setLoggingLevel( 159 (LoggingLevel)(Core::getSoftDebugLevel(OutputHandler::LD_Logfile) - 1)); 160 143 161 // create the CEGUI system singleton 144 162 this->guiSystem_ = new System(this->guiRenderer_, this->resourceProvider_, 0, this->scriptModule_); 145 146 // set the log level according to ours (translate by subtracting 1)147 Logger::getSingleton().setLoggingLevel(148 (LoggingLevel)(Core::getSoftDebugLevel(OutputHandler::LD_Logfile) - 1));149 163 150 164 // do this after 'new CEGUI::Sytem' because that creates the lua state in the first place -
code/trunk/src/orxonox/gui/GUIManager.h
r1887 r2710 42 42 #include "core/input/InputInterfaces.h" 43 43 44 namespace orxonox // tolua_export 45 { // tolua_export 44 // Forward declaration 45 namespace CEGUI { class DefaultLogger; } 46 47 // tolua_begin 48 namespace orxonox 49 { 46 50 /** 47 51 @brief 48 52 Provides a simple interface to CEGUI with tolua methods and console commands 49 53 */ 50 class _OrxonoxExport GUIManager : public KeyHandler, public MouseHandler51 /* 52 class GUIManager { // tolua_export53 */ 54 class _OrxonoxExport GUIManager 55 // tolua_end 56 : public KeyHandler, public MouseHandler 57 // tolua_begin 54 58 { 59 // tolua_end 55 60 public: 56 61 enum State … … 117 122 CEGUI::ResourceProvider* resourceProvider_; 118 123 CEGUI::LuaScriptModule* scriptModule_; 124 CEGUI::DefaultLogger* ceguiLogger_; 119 125 CEGUI::System* guiSystem_; 120 126 CEGUI::Imageset* backgroundImage_;
Note: See TracChangeset
for help on using the changeset viewer.