Changeset 1219 for code/trunk/src/orxonox/objects
- Timestamp:
- May 2, 2008, 10:44:57 PM (17 years ago)
- Location:
- code/trunk/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/SpaceShip.cc
r1209 r1219 32 32 #include <string> 33 33 34 #include <OIS/OIS.h>35 34 #include <OgreCamera.h> 36 35 #include <OgreRenderWindow.h> … … 39 38 40 39 #include "tinyxml/tinyxml.h" 40 #include "ois/OIS.h" 41 41 #include "util/Convert.h" 42 42 #include "util/Math.h" … … 428 428 void SpaceShip::tick(float dt) 429 429 { 430 if (InputManager::getSingleton().getMouse()->getEventCallback() != this) 431 { 432 if (InputManager::getSingleton().getMouse()) 433 { 434 InputManager::getSingleton().getMouse()->setEventCallback(this); 435 this->setMouseEventCallback_ = true; 436 } 430 if (!setMouseEventCallback_) 431 { 432 InputManager::addMouseHandler(this, "SpaceShip"); 433 setMouseEventCallback_ = true; 437 434 } 438 435 … … 457 454 } 458 455 459 OIS::Keyboard* mKeyboard = InputManager::getSingleton().getKeyboard(); 460 //FIXME: variable never used 461 //OIS::Mouse* mMouse = InputManager::getSingleton().getMouse(); 456 OIS::Keyboard* mKeyboard = InputManager::getKeyboard(); 462 457 463 458 -
code/trunk/src/orxonox/objects/SpaceShip.h
r1056 r1219 33 33 34 34 #include <OgrePrerequisites.h> 35 #include <OIS/OISMouse.h>36 35 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.