Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 4:12:04 PM (15 years ago)
Author:
rgrieder
Message:

Added a few more generic parts to the input library:

  • Created Mouse and Keyboard to join JoyStick and provided them with a templated base class (InputDeviceTemplated) that does most of the work (reduces quite some redundancy)
  • Created InputPrereqs.h from InputInterfaces.h and destroyed the latter
  • Exported InputHandler to its own file and replaced KeyHandler, MouseHandler and JoyStickHandler with the single InputHandler.
  • Deleted the SimpleInputState: There is only one class now which fulfills all our needs.

In general there is now less code and the code itself has more 'pluses'. However I haven't really thrown away any feature at all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/orxonox/gui/GUIManager.h

    r3261 r3274  
    4444
    4545#include "util/OgreForwardRefs.h"
    46 #include "core/input/InputInterfaces.h"
     46#include "core/input/InputHandler.h"
    4747
    4848// tolua_begin
     
    6262    class _OrxonoxExport GUIManager
    6363// tolua_end
    64         : public KeyHandler, public MouseHandler
     64        : public InputHandler
    6565// tolua_begin
    6666    {
     
    106106        void keyPressed (const KeyEvent& evt);
    107107        void keyReleased(const KeyEvent& evt);
    108         void keyHeld    (const KeyEvent& evt) { }
    109108
    110109        // mouseHandler functions
    111         void mouseButtonPressed (MouseButtonCode::ByEnum id);
    112         void mouseButtonReleased(MouseButtonCode::ByEnum id);
    113         void mouseButtonHeld    (MouseButtonCode::ByEnum id) { }
    114         void mouseMoved         (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
    115         void mouseScrolled      (int abs, int rel);
    116 
    117         void updateInput(float dt)  { }
    118         void updateKey  (float dt)  { }
    119         void updateMouse(float dt)  { }
     110        void buttonPressed (MouseButtonCode::ByEnum id);
     111        void buttonReleased(MouseButtonCode::ByEnum id);
     112        void mouseMoved    (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
     113        void mouseScrolled (int abs, int rel);
    120114
    121115        Ogre::RenderWindow*         renderWindow_;      //!< Ogre's render window to give CEGUI access to it
Note: See TracChangeset for help on using the changeset viewer.