Changeset 2808 for code/branches/gui/src/orxonox/gui/GUIManager.cc
- Timestamp:
- Mar 21, 2009, 1:07:53 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gui/GUIManager.cc
r2801 r2808 63 63 namespace orxonox 64 64 { 65 SetConsoleCommandShortcut(GUIManager, showGUI_s).keybindMode(KeybindMode::OnPress);65 SetConsoleCommandShortcut(GUIManager, toggleGUI).keybindMode(KeybindMode::OnPress); 66 66 67 67 GUIManager* GUIManager::singletonRef_s = 0; … … 143 143 144 144 // Note: No SceneManager specified yet 145 this->guiRenderer_ = new OgreCEGUIRenderer(renderWindow_, Ogre::RENDER_QUEUE_ MAIN, true, 3000);145 this->guiRenderer_ = new OgreCEGUIRenderer(renderWindow_, Ogre::RENDER_QUEUE_OVERLAY, true, 3000); 146 146 this->resourceProvider_ = guiRenderer_->createResourceProvider(); 147 147 this->resourceProvider_->setDefaultResourceGroup("GUI"); … … 172 172 173 173 // load the background scene 174 //loadScenes();174 loadScenes(); 175 175 //CEGUI::KeyEventArgs e; 176 176 //e.codepoint … … 204 204 tolua_Orxonox_open(this->scriptModule_->getLuaState()); 205 205 */ 206 this->scriptModule_->executeScriptFile(" ingameGUI.lua", "GUI");206 this->scriptModule_->executeScriptFile("loadGUI.lua", "GUI"); 207 207 } 208 208 catch (CEGUI::Exception& ex) … … 261 261 } 262 262 263 void GUIManager::toggleGUI() 264 { 265 //COUT(0) << "********* TOGGLE TOGGLE **********" << std::endl; 266 getInstance().scriptModule_->executeScriptGlobal("toggleGUI"); 267 } 268 263 269 void GUIManager::showGUI(const std::string& name, Ogre::SceneManager* sceneManager)// bool showBackground) 264 270 { … … 271 277 try 272 278 { 273 //COUT (0) << "************* sceneManager: " << sceneManager << std::endl;279 // COUT (0) << "************* sceneManager: " << sceneManager << std::endl; 274 280 if (!sceneManager) 275 281 { … … 286 292 //this->viewport_->setClearEveryFrame(false); 287 293 this->guiRenderer_->setTargetSceneManager(sceneManager); 294 currentSceneManager_ = sceneManager; 288 295 //this->viewport_->setCamera(this->emptyCamera_); 289 296 … … 311 318 COUT(2) << "Warning: GUI Manager not yet initialised, cannot load a GUI" << std::endl; 312 319 } 320 } 321 322 void GUIManager::testFct() 323 { 324 //COUT(0) << "**** " << currentSceneManager_ << std::endl; 325 this->showGUI("IngameMenu", currentSceneManager_); 326 } 327 328 void GUIManager::testOutput(const std::string& str) 329 { 330 COUT(0) << "***" << str << "***" << std::endl; 313 331 } 314 332
Note: See TracChangeset
for help on using the changeset viewer.