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 moved

Legend:

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

    r1412 r1413  
    3232 */
    3333
    34 #ifndef _InputHandler_H__
    35 #define _InputHandler_H__
     34#ifndef _KeyBinder_H__
     35#define _KeyBinder_H__
    3636
    3737#include "CorePrereqs.h"
     
    141141  public:
    142142    KeyBinder ();
    143     ~KeyBinder();
     143    virtual ~KeyBinder();
    144144
    145145    void loadBindings();
    146     void clearBindings(bool bInit = false);
    147 
     146    void clearBindings();
    148147    void setConfigValues();
    149148
    150   private: // functions
     149  protected: // functions
     150    void tickInput(float dt, const HandlerState& state);
     151
    151152    void readTrigger(Button& button);
    152 
    153     //static void clearBundle(KeyBindingBundle& bundle, bool bInit);
    154     //static void redimensionBinding(KeyBinding& binding);
    155 
    156     void tick(float dt);
    157153
    158154    void keyPressed (const KeyEvent& evt);
     
    171167    void joyStickAxisMoved     (int joyStickID, int axis, int value);
    172168
    173   private: // variables
     169  protected: // variables
    174170    //! denotes the number of different keys there are in OIS.
    175171    static const unsigned int nKeys_s = 0xEE;
     
    231227
    232228
    233   /**
    234     @brief Captures mouse and keyboard input and distributes it to the
    235     GUI.
    236   */
    237   //class _CoreExport GUIInputHandler : public KeyHandler, public MouseHandler, public JoyStickHandler
    238   //{
    239   //public:
    240   //  GUIInputHandler ();
    241   //  ~GUIInputHandler();
    242 
    243   //private:
    244   //  // input events
    245     //bool keyPressed   (const OIS::KeyEvent   &arg);
    246     //bool keyReleased  (const OIS::KeyEvent   &arg);
    247     //bool keyHeld      (const OIS::KeyEvent   &arg);
    248 
    249   //  bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButton id);
    250     //bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButton id);
    251     //bool mouseHeld    (const OIS::MouseEvent &arg, OIS::MouseButton id);
    252   //  bool mouseMoved   (const OIS::MouseEvent &arg);
    253 
    254     //bool buttonPressed (const OIS::JoyStickEvent &arg, int button);
    255     //bool buttonReleased(const OIS::JoyStickEvent &arg, int button);
    256     //bool buttonHeld    (const OIS::JoyStickEvent &arg, int button);
    257     //bool axisMoved     (const OIS::JoyStickEvent &arg, int axis);
    258     //bool sliderMoved   (const OIS::JoyStickEvent &arg, int id);
    259     //bool povMoved      (const OIS::JoyStickEvent &arg, int id);
    260   //};
    261 
     229  class _CoreExport KeyDetector : public KeyBinder
     230  {
     231  public:
     232    KeyDetector();
     233    ~KeyDetector();
     234    void loadBindings();
     235    void setConfigValues();
     236  protected:
     237    void readTrigger(Button& button);
     238  };
    262239}
    263240
    264 #endif /* _InputHandler_H__ */
     241
     242
     243
     244#endif /* _KeyBinder_H__ */
Note: See TracChangeset for help on using the changeset viewer.