Changeset 1213 for code/branches/input/src/orxonox/objects
- Timestamp:
- May 1, 2008, 8:33:53 PM (17 years ago)
- Location:
- code/branches/input/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/orxonox/objects/SpaceShip.cc
r1195 r1213 428 428 void SpaceShip::tick(float dt) 429 429 { 430 if (InputManager::getMouse()->getEventCallback() != this) 431 { 432 if (InputManager::getMouse()) 433 { 434 InputManager::getMouse()->setEventCallback(this); 435 this->setMouseEventCallback_ = true; 436 } 430 if (!setMouseEventCallback_) 431 { 432 InputManager::addMouseHandler(this, "SpaceShip"); 433 InputManager::enableMouseHandler("SpaceShip"); 434 setMouseEventCallback_ = true; 437 435 } 438 436 … … 458 456 459 457 OIS::Keyboard* mKeyboard = InputManager::getKeyboard(); 460 //FIXME: variable never used461 //OIS::Mouse* mMouse = InputManager::getSingleton().getMouse();462 458 463 459 -
code/branches/input/src/orxonox/objects/SpaceShip.h
r1195 r1213 34 34 #include <OgrePrerequisites.h> 35 35 36 #include " ois/OISMouse.h"36 #include "core/InputHandler.h" 37 37 #include "Model.h" 38 38 #include "../tools/BillboardSet.h" … … 40 40 namespace orxonox 41 41 { 42 class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener42 class _OrxonoxExport SpaceShip : public Model, public MouseHandler 43 43 { 44 44 public: … … 68 68 bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); 69 69 bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); 70 bool mouseHeld(const OIS::MouseEvent &e, OIS::MouseButtonID id) { return true; } 70 71 71 72
Note: See TracChangeset
for help on using the changeset viewer.