Changeset 2840
- Timestamp:
- Mar 25, 2009, 11:15:28 AM (16 years ago)
- Location:
- code/branches/gui/src/orxonox/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gui/GUIManager.cc
r2834 r2840 187 187 188 188 state_ = Ready; 189 189 190 } 190 191 … … 249 250 { 250 251 this->scriptModule_->executeScriptFile("loadGUI.lua", "GUI"); 252 lua_pushfstring(this->scriptModule_->getLuaState(), Core::getMediaPathString().c_str()); 253 lua_setglobal(this->scriptModule_->getLuaState(), "datapath"); 251 254 } 252 255 catch (CEGUI::Exception& ex) … … 264 267 { 265 268 //COUT(0) << "********* TOGGLE TOGGLE **********" << std::endl; 266 getInstance().scriptModule_->executeScriptGlobal("toggleGUI"); 269 if (getInstance().scriptModule_->executeScriptGlobal("toggleGUI")) 270 InputManager::getInstance().requestEnterState("gui"); 271 else 272 InputManager::getInstance().requestLeaveState("gui"); 267 273 } 268 274 269 275 void GUIManager::setCamera(Ogre::Camera* camera) 270 276 { 271 this-> showGUI("default",camera->getSceneManager());277 this->guiRenderer_->setTargetSceneManager(camera->getSceneManager()); 272 278 } 273 279 … … 304 310 } 305 311 306 this->scriptModule_->executeScriptGlobal("showMainMenu"); 312 lua_pushfstring(this->scriptModule_->getLuaState(), "mainmenu.lua"); 313 lua_setglobal(this->scriptModule_->getLuaState(), "filename"); 314 315 this->scriptModule_->executeScriptGlobal("showGUI"); 307 316 308 317 InputManager::getInstance().requestEnterState("gui"); … … 325 334 } 326 335 327 void GUIManager::testFct()336 /*void GUIManager::testFct() 328 337 { 329 338 //COUT(0) << "**** " << currentSceneManager_ << std::endl; … … 334 343 { 335 344 COUT(0) << "***" << str << "***" << std::endl; 336 } 345 }*/ 337 346 338 347 void GUIManager::hideGUI() -
code/branches/gui/src/orxonox/gui/GUIManager.h
r2834 r2840 79 79 void showGUI(const std::string& name, Ogre::SceneManager* sceneManager);// bool showBackground); // tolua_export 80 80 void hideGUI(); // tolua_export 81 void testOutput(const std::string& str); // tolua_export81 //void testOutput(const std::string& str); // tolua_export 82 82 83 83 static void toggleGUI(); … … 92 92 93 93 // please remove 94 void testFct();94 //void testFct(); 95 95 96 96 static GUIManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; } // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.