Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 13, 2009, 8:54:43 PM (15 years ago)
Author:
rgrieder
Message:

Added and adjusted documentation for the devices.
Also removed one last ugliness where the InputManager was called from within a device (which should not even know about the InputManager).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/input/Mouse.cc

    r3276 r3286  
    3030
    3131#include <ois/OISMouse.h>
    32 #include <boost/foreach.hpp>
    3332#include "InputState.h"
    3433#include "core/ConsoleCommand.h"
     
    4140namespace orxonox
    4241{
    43     Mouse::Mouse(unsigned int id, unsigned int windowWidth, unsigned int windowHeight)
    44         : super(id)
     42    Mouse::Mouse(unsigned int id, OIS::InputManager* oisInputManager, unsigned int windowWidth, unsigned int windowHeight)
     43        : super(id, oisInputManager)
    4544    {
    4645        this->setMouseClipping(windowWidth, windowHeight);
     
    7473            IntVector2 rel(e.state.X.rel, e.state.Y.rel);
    7574            IntVector2 clippingSize(e.state.width, e.state.height);
    76             BOOST_FOREACH(InputState* state, inputStates_)
    77                 state->mouseMoved(abs, rel, clippingSize);
     75            for (unsigned int i = 0; i < inputStates_.size(); ++i)
     76                inputStates_[i]->mouseMoved(abs, rel, clippingSize);
    7877        }
    7978
     
    8180        if (e.state.Z.rel != 0)
    8281        {
    83             BOOST_FOREACH(InputState* state, inputStates_)
    84                 state->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
     82            for (unsigned int i = 0; i < inputStates_.size(); ++i)
     83                inputStates_[i]->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
    8584        }
    8685
Note: See TracChangeset for help on using the changeset viewer.