Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2008, 10:44:57 PM (17 years ago)
Author:
rgrieder
Message:

merged input branch back to trunk. Not yet tested on tardis

Location:
code/trunk/src/orxonox/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1209 r1219  
    3232#include <string>
    3333
    34 #include <OIS/OIS.h>
    3534#include <OgreCamera.h>
    3635#include <OgreRenderWindow.h>
     
    3938
    4039#include "tinyxml/tinyxml.h"
     40#include "ois/OIS.h"
    4141#include "util/Convert.h"
    4242#include "util/Math.h"
     
    428428    void SpaceShip::tick(float dt)
    429429    {
    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;
    437434        }
    438435
     
    457454        }
    458455
    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();
    462457
    463458
  • code/trunk/src/orxonox/objects/SpaceShip.h

    r1056 r1219  
    3333
    3434#include <OgrePrerequisites.h>
    35 #include <OIS/OISMouse.h>
    3635
     36#include "core/InputHandler.h"
    3737#include "Model.h"
    3838#include "../tools/BillboardSet.h"
     
    4040namespace orxonox
    4141{
    42     class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener
     42    class _OrxonoxExport SpaceShip : public Model, public MouseHandler
    4343    {
    4444        public:
     
    6868            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
    6969            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
     70            bool mouseHeld(const OIS::MouseEvent &e, OIS::MouseButtonID id) { return true; }
    7071
    7172
Note: See TracChangeset for help on using the changeset viewer.