Changeset 6746 for code/trunk/src/orxonox/gamestates
- Timestamp:
- Apr 16, 2010, 2:50:16 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gamestates/GSLevel.cc
r6417 r6746 69 69 { 70 70 gameInputState_ = InputManager::getInstance().createInputState("game"); 71 gameInputState_->setMouse Mode(MouseMode::Exclusive);71 gameInputState_->setMouseExclusive(TriBool::True); 72 72 gameInputState_->setHandler(KeyBinderManager::getInstance().getDefaultAsHandler()); 73 73 KeyBinderManager::getInstance().setToDefault(); 74 74 75 75 guiMouseOnlyInputState_ = InputManager::getInstance().createInputState("guiMouseOnly"); 76 guiMouseOnlyInputState_->setMouse Mode(MouseMode::Exclusive);77 guiMouseOnlyInputState_->setMouseHandler( GUIManager::getInstancePtr());76 guiMouseOnlyInputState_->setMouseExclusive(TriBool::True); 77 guiMouseOnlyInputState_->setMouseHandler(&GUIManager::getInstance()); 78 78 79 79 guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly"); 80 guiKeysOnlyInputState_->setKeyHandler( GUIManager::getInstancePtr());80 guiKeysOnlyInputState_->setKeyHandler(&GUIManager::getInstance()); 81 81 } 82 82 -
code/trunk/src/orxonox/gamestates/GSMainMenu.cc
r6417 r6746 31 31 #include <OgreSceneManager.h> 32 32 33 #include "core/input/InputManager.h"34 #include "core/input/InputState.h"35 33 #include "core/input/KeyBinderManager.h" 36 34 #include "core/Game.h" … … 42 40 #include "Scene.h" 43 41 #include "sound/AmbientSound.h" 42 // HACK 43 #include "core/input/InputManager.h" 44 #include "core/input/InputState.h" 44 45 45 46 namespace orxonox … … 49 50 GSMainMenu::GSMainMenu(const GameStateInfo& info) 50 51 : GameState(info) 51 , inputState_(0)52 52 { 53 53 RegisterRootObject(GSMainMenu); 54 inputState_ = InputManager::getInstance().createInputState("mainMenu"); 55 inputState_->setMouseMode(MouseMode::Nonexclusive); 56 inputState_->setHandler(GUIManager::getInstancePtr()); 57 inputState_->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler()); 58 inputState_->setJoyStickHandler(&InputHandler::EMPTY); 54 55 InputManager::getInstance().createInputState("MainMenuHackery")->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler()); 59 56 60 57 // create an empty Scene … … 76 73 this->ambient_->destroy(); 77 74 78 InputManager::getInstance().destroyState(" mainMenu");75 InputManager::getInstance().destroyState("MainMenuHackery"); 79 76 80 77 this->scene_->getSceneManager()->destroyCamera(this->camera_); … … 85 82 { 86 83 // show main menu 87 GUIManager::getInstance().showGUI("MainMenu", true , GraphicsManager::getInstance().isFullScreen());84 GUIManager::getInstance().showGUI("MainMenu", true); 88 85 GUIManager::getInstance().setCamera(this->camera_); 89 GUIManager::getInstance().setBackground("MainMenuBackground"); 90 // GUIManager::getInstance().setBackground(""); 86 GUIManager::getInstance().setBackgroundImage("MainMenuBackground", "Background"); 91 87 GraphicsManager::getInstance().setCamera(this->camera_); 88 89 InputManager::getInstance().enterState("MainMenuHackery"); 92 90 93 91 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startStandalone), "startGame")); … … 101 99 102 100 KeyBinderManager::getInstance().setToDefault(); 103 InputManager::getInstance().enterState("mainMenu");104 101 105 102 this->setConfigValues(); … … 119 116 } 120 117 121 InputManager::getInstance().leaveState(" mainMenu");118 InputManager::getInstance().leaveState("MainMenuHackery"); 122 119 123 120 GUIManager::getInstance().setCamera(0); 124 GUIManager::getInstance().setBackground ("");121 GUIManager::getInstance().setBackgroundImage(""); 125 122 GUIManager::hideGUI("MainMenu"); 126 123 GraphicsManager::getInstance().setCamera(0); -
code/trunk/src/orxonox/gamestates/GSMainMenu.h
r6417 r6746 61 61 62 62 private: 63 InputState* inputState_;64 63 Scene* scene_; 65 64 Ogre::Camera* camera_;
Note: See TracChangeset
for help on using the changeset viewer.