Changeset 3357 for code/branches/resource
- Timestamp:
- Jul 27, 2009, 1:57:28 PM (15 years ago)
- Location:
- code/branches/resource/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/orxonox/gamestates/GSGraphics.cc
r3355 r3357 65 65 , debugOverlay_(0) 66 66 { 67 // load master key bindings 68 masterInputState_ = InputManager::getInstance().createInputState("master", true); 69 masterKeyBinder_ = new KeyBinder(); 67 70 } 68 71 69 72 GSGraphics::~GSGraphics() 70 73 { 74 InputManager::getInstance().destroyState("master"); 75 delete this->masterKeyBinder_; 71 76 } 72 77 … … 92 97 this->debugOverlay_ = new XMLFile(Core::getMediaPathString() + "overlay/debug.oxo"); 93 98 Loader::open(debugOverlay_); 94 // load master key bindings 95 masterInputState_ = InputManager::getInstance().createInputState("master", true); 96 masterKeyBinder_ = new KeyBinder(); 99 97 100 masterKeyBinder_->loadBindings("masterKeybindings.ini"); 98 101 masterInputState_->setKeyHandler(masterKeyBinder_); … … 130 133 } 131 134 */ 132 133 masterInputState_->setHandler(0);134 InputManager::getInstance().destroyState("master");135 delete this->masterKeyBinder_;136 135 137 136 delete this->console_; -
code/branches/resource/src/orxonox/gamestates/GSMainMenu.cc
r3355 r3357 49 49 , inputState_(0) 50 50 { 51 }52 53 GSMainMenu::~GSMainMenu()54 {55 }56 57 void GSMainMenu::activate()58 {59 51 inputState_ = InputManager::getInstance().createInputState("mainMenu"); 60 52 inputState_->setHandler(GUIManager::getInstancePtr()); … … 65 57 // and a Camera 66 58 this->camera_ = this->scene_->getSceneManager()->createCamera("mainMenu/Camera"); 59 } 67 60 61 GSMainMenu::~GSMainMenu() 62 { 63 InputManager::getInstance().destroyState("mainMenu"); 64 65 this->scene_->getSceneManager()->destroyCamera(this->camera_); 66 delete this->scene_; 67 } 68 69 void GSMainMenu::activate() 70 { 68 71 // show main menu 69 72 GUIManager::getInstance().showGUI("mainmenu_4"); … … 107 110 108 111 InputManager::getInstance().leaveState("mainMenu"); 109 InputManager::getInstance().destroyState("mainMenu");110 112 111 113 GUIManager::getInstance().setCamera(0); 112 114 GraphicsManager::getInstance().setCamera(0); 113 this->scene_->getSceneManager()->destroyCamera(this->camera_);114 delete this->scene_;115 115 116 116 /*
Note: See TracChangeset
for help on using the changeset viewer.