Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2008, 8:12:20 PM (16 years ago)
Author:
rgrieder
Message:
  • renamed InputHandler to KeyBinder
  • added feature to detect a key in input part
  • added def_keybindings.ini and removed keybindings.ini
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/core/InputInterfaces.h

    r1349 r1413  
    254254                std::vector<Vector3> mVectors;
    255255  };*/
     256 
     257  /**
     258  * Helper struct to determine which handlers of an object (can implement
     259  * multiple handlers) are active.
     260  */
     261  struct HandlerState
     262  {
     263    HandlerState() : key(false), mouse(false), joyStick(false) { }
     264    bool key;
     265    bool mouse;
     266    bool joyStick;
     267  };
    256268
    257269  class _CoreExport InputTickable
     
    259271  public:
    260272    virtual ~InputTickable() { }
    261     virtual void tick(float dt) = 0;
     273    virtual void tickInput(float dt, const HandlerState& state) = 0;
    262274  };
    263275
     
    272284    virtual void keyReleased(const KeyEvent& evt) = 0;
    273285    virtual void keyHeld    (const KeyEvent& evt) = 0;
     286    //virtual void tickKey    (float dt) { }
    274287  };
    275288
     
    286299    virtual void mouseMoved         (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) = 0;
    287300    virtual void mouseScrolled      (int abs, int rel)     = 0;
     301    //virtual void tickMouse          (float dt) { }
    288302  };
    289303
     
    301315    virtual void joyStickAxisMoved     (int joyStickID, int axis, int value) = 0;
    302316    //virtual bool joyStickVector3Moved  (int joyStickID, int index /*, fill list*/) {return true;}
     317    //virtual void tickJoyStick          (float dt) { }
    303318  };
    304319
Note: See TracChangeset for help on using the changeset viewer.