Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 6, 2009, 1:59:00 AM (15 years ago)
Author:
landauf
Message:

Merged gui branch back to trunk.

I did 2 small changes in IngameManager.cc on line 777 and 888 (yes, really), because const_reverse_iterator strangely doesn't work on MinGW.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/input/InputManager.h

    r2662 r2896  
    4343#include <stack>
    4444#include "util/Math.h"
     45#include "util/OrxEnum.h"
    4546#include "core/OrxonoxClass.h"
    4647#include "InputInterfaces.h"
     
    7475        float positiveCoeff[24];
    7576        float negativeCoeff[24];
     77    };
     78
     79    struct InputStatePriority : OrxEnum<InputStatePriority>
     80    {
     81        OrxEnumConstructors(InputStatePriority);
     82
     83        static const int Empty        = -1;
     84        static const int Dynamic      = 0;
     85
     86        static const int HighPriority = 1000;
     87        static const int Console      = HighPriority + 0;
     88        static const int Calibrator   = HighPriority + 1;
     89        static const int Detector     = HighPriority + 2;
    7690    };
    7791
     
    116130
    117131        template <class T>
    118         T* createInputState(const std::string& name, int priority);
     132        T* createInputState(const std::string& name, bool bAlwaysGetsInput = false, bool bTransparent = false, InputStatePriority priority = InputStatePriority::Dynamic);
    119133
    120134        InputState* getState       (const std::string& name);
    121135        InputState* getCurrentState();
    122         ExtendedInputState* getMasterInputState() { return this->stateMaster_; }
    123136        bool requestDestroyState   (const std::string& name);
    124137        bool requestEnterState     (const std::string& name);
    125138        bool requestLeaveState     (const std::string& name);
    126139
    127         void tick(float dt);
     140        void update(const Clock& time);
    128141
    129142        static InputManager& getInstance()    { assert(singletonRef_s); return *singletonRef_s; }
     
    165178
    166179        void _updateActiveStates();
    167         bool _configureInputState(InputState* state, const std::string& name, int priority);
     180        bool _configureInputState(InputState* state, const std::string& name, bool bAlwaysGetsInput, bool bTransparent, int priority);
    168181
    169182        // input events
     
    197210        // some internally handled states and handlers
    198211        SimpleInputState*                   stateEmpty_;
    199         ExtendedInputState*                 stateMaster_;          //!< Always active master input state
    200212        KeyDetector*                        keyDetector_;          //!< KeyDetector instance
    201213        InputBuffer*                        calibratorCallbackBuffer_;
    202214
    203215        std::map<std::string, InputState*>  inputStatesByName_;
    204         std::map<int, InputState*>          inputStatesByPriority_;
    205216
    206217        std::set<InputState*>               stateEnterRequests_;   //!< Request to enter a new state
     
    209220
    210221        std::map<int, InputState*>          activeStates_;
    211         std::vector<InputState*>            activeStatesTop_;      //!< Current input states for joy stick events.
    212         std::vector<InputState*>            activeStatesTicked_;   //!< Current input states for joy stick events.
     222        std::vector<std::vector<InputState*> > activeStatesTriggered_;
     223        std::vector<InputState*>            activeStatesTicked_;
    213224
    214225        // joystick calibration
     
    249260    */
    250261    template <class T>
    251     T* InputManager::createInputState(const std::string& name, int priority)
     262    T* InputManager::createInputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority)
    252263    {
    253264        T* state = new T;
    254         if (_configureInputState(state, name, priority))
     265        if (_configureInputState(state, name, bAlwaysGetsInput, bTransparent, priority))
    255266            return state;
    256267        else
Note: See TracChangeset for help on using the changeset viewer.