Changeset 6658 for code/branches/gamestate/src/libraries
- Timestamp:
- Mar 30, 2010, 3:41:15 PM (15 years ago)
- Location:
- code/branches/gamestate/src/libraries/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/src/libraries/core/GUIManager.cc
r6537 r6658 253 253 } 254 254 255 const std::string& GUIManager::createInputState(const std::string& name, TriBool::Value show Mouse, TriBool::Value useKeyboard, bool bBlockJoyStick)255 const std::string& GUIManager::createInputState(const std::string& name, TriBool::Value showCursor, TriBool::Value useKeyboard, bool bBlockJoyStick) 256 256 { 257 257 InputState* state = InputManager::getInstance().createInputState(name); 258 258 259 if (GraphicsManager::getInstance().isFullScreen() && showMouse == TriBool::True || 260 !GraphicsManager::getInstance().isFullScreen() && showMouse == TriBool::False) 259 /* Table that maps isFullScreen() and showCursor to mouseExclusive 260 isFullscreen / showCursor | True | False | Dontcare 261 ---------------------------------------------------- 262 true | True | True | Dontcare 263 ---------------------------------------------------- 264 false | False | True | Dontcare 265 */ 266 if (showCursor == TriBool::Dontcare) 267 state->setMouseExclusive(TriBool::Dontcare); 268 else if (GraphicsManager::getInstance().isFullScreen() || showCursor == TriBool::False) 261 269 state->setMouseExclusive(TriBool::True); 262 270 else 263 state->setMouseExclusive(TriBool:: Dontcare);264 265 if (show Mouse== TriBool::True)271 state->setMouseExclusive(TriBool::False); 272 273 if (showCursor == TriBool::True) 266 274 state->setMouseHandler(this); 267 else if (show Mouse== TriBool::False)275 else if (showCursor == TriBool::False) 268 276 state->setMouseHandler(&InputHandler::EMPTY); 269 277 -
code/branches/gamestate/src/libraries/core/GUIManager.h
r6537 r6658 81 81 void setBackground(const std::string& name); 82 82 83 const std::string& createInputState(const std::string& name, TriBool::Value show Mouse= TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export83 const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export 84 84 85 85 void setCamera(Ogre::Camera* camera); -
code/branches/gamestate/src/libraries/core/input/InputManager.h
r6657 r6658 168 168 //! Returns a pointer to the OIS InputManager. Only you if you know what you're doing! 169 169 OIS::InputManager* getOISInputManager() { return this->oisInputManager_; } 170 //! Returns the position of the cursor as std::pair of ints 170 171 std::pair<int, int> getMousePosition() const; 172 //! Tells whether the mouse is used exclusively to the game 173 bool isMouseExclusive() const { return this->exclusiveMouse_; } // tolua_export 171 174 172 175 //-------------------------------
Note: See TracChangeset
for help on using the changeset viewer.