Changeset 1646 for code/branches/gui/src/orxonox/gui/GUIManager.cc
- Timestamp:
- Jul 24, 2008, 10:40:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gui/GUIManager.cc
r1645 r1646 58 58 SetConsoleCommandShortcut(GUIManager, showGUI_s).setKeybindMode(KeybindMode::OnPress); 59 59 60 GUIManager* GUIManager::singletonRef_s = 0; 61 60 62 GUIManager::GUIManager() 61 63 //: emptySceneManager_(0) … … 71 73 , state_(Uninitialised) 72 74 { 75 assert(singletonRef_s == 0); 76 singletonRef_s = this; 73 77 } 74 78 75 79 GUIManager::~GUIManager() 76 80 { 77 // TODO: destruct at least something 81 if (backgroundCamera_) 82 backgroundSceneManager_->destroyCamera(backgroundCamera_); 83 84 if (backgroundSceneManager_) 85 Ogre::Root::getSingleton().destroySceneManager(backgroundSceneManager_); 86 87 InputManager::getInstance().destroyState("gui"); 88 89 if (guiSystem_) 90 delete guiSystem_; 91 92 if (scriptModule_) 93 { 94 // destroy our own tolua interfaces 95 //lua_pushnil(luaState_); 96 //lua_setglobal(luaState_, "Orxonox"); 97 //lua_pushnil(luaState_); 98 //lua_setglobal(luaState_, "Core"); 99 // TODO: deleting the script module fails an assertation. 100 // However there is not much we can do about it since it occurs too when 101 // we don't open Core or Orxonox. Might be a CEGUI issue. 102 // The memory leak is not a problem anyway.. 103 //delete scriptModule_; 104 } 105 106 if (guiRenderer_) 107 delete guiRenderer_; 108 109 singletonRef_s = 0; 78 110 } 79 111 … … 104 136 // setup scripting 105 137 this->scriptModule_ = new LuaScriptModule(); 138 this->luaState_ = this->scriptModule_->getLuaState(); 106 139 107 140 // create the CEGUI system singleton … … 267 300 268 301 269 /**270 @brief271 Returns a unique instance of GUIManager.272 @return273 The instance274 */275 GUIManager& GUIManager::getInstance()276 {277 static GUIManager instance;278 return instance;279 }280 281 302 inline CEGUI::MouseButton GUIManager::convertButton(MouseButton::Enum button) 282 303 {
Note: See TracChangeset
for help on using the changeset viewer.