Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 1, 2008, 8:33:53 PM (17 years ago)
Author:
rgrieder
Message:
  • Key bindings can now be stored in keybindings.ini
  • doesn't work for move movement yet, but for the buttons.
Location:
code/branches/input/src/orxonox/objects
Files:
2 edited

Legend:

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

    r1195 r1213  
    428428    void SpaceShip::tick(float dt)
    429429    {
    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;
    437435        }
    438436
     
    458456
    459457        OIS::Keyboard* mKeyboard = InputManager::getKeyboard();
    460         //FIXME: variable never used
    461         //OIS::Mouse* mMouse = InputManager::getSingleton().getMouse();
    462458
    463459
  • code/branches/input/src/orxonox/objects/SpaceShip.h

    r1195 r1213  
    3434#include <OgrePrerequisites.h>
    3535
    36 #include "ois/OISMouse.h"
     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.