Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 13, 2009, 10:43:59 PM (16 years ago)
Author:
rgrieder
Message:

Finally found a satisfying way to deal with interfaces that deliver information, but only upon virtual call.
The solution involves a static variable but any other (and uglier/hackier) solution will do so too.
I applied the method the the JoyStickQuantityListener so that the KeyBinder is now independent on the InputManager.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/input/InputState.h

    r3279 r3288  
    9797
    9898    private:
    99         InputState();
     99        InputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority);
    100100        ~InputState() { }
    101101
    102         void JoyStickQuantityChanged(unsigned int n);
     102        void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList);
    103103
    104         void setName(const std::string& name) { name_ = name; }
    105         void setPriority(int priority)        { priority_ = priority; }
     104        void setPriority(int priority) { priority_ = priority; }
    106105
    107         std::string                 name_;
     106        const std::string           name_;
     107        const bool                  bAlwaysGetsInput_;
     108        const bool                  bTransparent_;
    108109        int                         priority_;
    109         bool                        bAlwaysGetsInput_;
    110         bool                        bTransparent_;
    111110        bool                        bExpired_;
    112111        std::vector<InputHandler*>  handlers_;
Note: See TracChangeset for help on using the changeset viewer.