Changeset 6746 for code/trunk/src/orxonox
- Timestamp:
- Apr 16, 2010, 2:50:16 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 9 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/CameraManager.h
r5929 r6746 61 61 void useCamera(Ogre::Camera* camera); 62 62 63 static CameraManager* getInstancePtr() { return singletonPtr_s; }64 65 63 private: 66 64 CameraManager(const CameraManager&); // don't use -
code/trunk/src/orxonox/Level.cc
r6417 r6746 58 58 if (this->isInitialized()) 59 59 { 60 if (LevelManager:: getInstancePtr())60 if (LevelManager::exists()) 61 61 LevelManager::getInstance().releaseActivity(this); 62 62 … … 116 116 (*it)->setGametype(rootgametype); 117 117 118 if (LevelManager:: getInstancePtr())118 if (LevelManager::exists()) 119 119 LevelManager::getInstance().requestActivity(this); 120 120 } -
code/trunk/src/orxonox/LevelManager.h
r6417 r6746 62 62 const std::string& getAvailableLevelListItem(unsigned int index) const; //tolua_export 63 63 64 static LevelManager* getInstancePtr() { return singletonPtr_s; }65 64 static LevelManager& getInstance() { return Singleton<LevelManager>::getInstance(); } // tolua_export 66 65 -
code/trunk/src/orxonox/PlayerManager.cc
r6417 r6746 66 66 this->clients_[clientID] = player; 67 67 68 if (LevelManager:: getInstancePtr() && LevelManager::getInstance().getActiveLevel())68 if (LevelManager::exists() && LevelManager::getInstance().getActiveLevel()) 69 69 LevelManager::getInstance().getActiveLevel()->playerEntered(player); 70 70 } … … 82 82 this->clients_.erase(clientID); 83 83 84 if (LevelManager:: getInstancePtr() && LevelManager::getInstance().getActiveLevel())84 if (LevelManager::exists() && LevelManager::getInstance().getActiveLevel()) 85 85 LevelManager::getInstance().getActiveLevel()->playerLeft(player); 86 86 -
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_; -
code/trunk/src/orxonox/overlays/CMakeLists.txt
r5929 r6746 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 GUISheet.cc 2 3 OrxonoxOverlay.cc 3 4 OverlayGroup.cc
Note: See TracChangeset
for help on using the changeset viewer.