Changeset 2816 for code/branches/gui/src/core/input/InputManager.h
- Timestamp:
- Mar 21, 2009, 8:47:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/core/input/InputManager.h
r2814 r2816 130 130 131 131 template <class T> 132 T* createInputState(const std::string& name, InputStatePriority priority = InputStatePriority::Dynamic);132 T* createInputState(const std::string& name, bool bAlwaysGetsInput = false, bool bTransparent = false, InputStatePriority priority = InputStatePriority::Dynamic); 133 133 134 134 InputState* getState (const std::string& name); 135 135 InputState* getCurrentState(); 136 ExtendedInputState* getMasterInputState() { return this->stateMaster_; }137 136 bool requestDestroyState (const std::string& name); 138 137 bool requestEnterState (const std::string& name); … … 179 178 180 179 void _updateActiveStates(); 181 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); 182 181 183 182 // input events … … 211 210 // some internally handled states and handlers 212 211 SimpleInputState* stateEmpty_; 213 ExtendedInputState* stateMaster_; //!< Always active master input state214 212 KeyDetector* keyDetector_; //!< KeyDetector instance 215 213 InputBuffer* calibratorCallbackBuffer_; … … 222 220 223 221 std::map<int, InputState*> activeStates_; 224 std::vector< InputState*> activeStatesTop_; //!< Current input states for joy stick events.225 std::vector<InputState*> activeStatesTicked_; //!< Current input states for joy stick events.222 std::vector<std::vector<InputState*> > activeStatesTriggered_; 223 std::vector<InputState*> activeStatesTicked_; 226 224 227 225 // joystick calibration … … 262 260 */ 263 261 template <class T> 264 T* InputManager::createInputState(const std::string& name, InputStatePriority priority)262 T* InputManager::createInputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority) 265 263 { 266 264 T* state = new T; 267 if (_configureInputState(state, name, priority))265 if (_configureInputState(state, name, bAlwaysGetsInput, bTransparent, priority)) 268 266 return state; 269 267 else
Note: See TracChangeset
for help on using the changeset viewer.