Changeset 1413 for code/branches/network/src/core/InputManager.h
- Timestamp:
- May 24, 2008, 8:12:20 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/core/InputManager.h
r1349 r1413 80 80 enum InputState 81 81 { 82 IS_UNINIT, //!< InputManager has not yet been initialised. 83 IS_NONE, //!< Input is discarded. 84 IS_NORMAL, //!< Normal play state. Key and button bindings are active. 85 IS_GUI, //!< All OIS input events are passed to CEGUI. 86 IS_CONSOLE, //!< Keyboard input is redirected to the InputBuffer. 87 IS_CUSTOM //!< Any possible configuration. 82 IS_UNINIT, //!< InputManager has not yet been initialised. 83 IS_NONE, //!< Input is discarded. 84 IS_NORMAL, //!< Normal play state. Key and button bindings are active. 85 IS_GUI, //!< All OIS input events are passed to CEGUI. 86 IS_CONSOLE, //!< Keyboard input is redirected to the InputBuffer. 87 IS_DETECTION, //!< All the input goes to the KeyDetector 88 IS_CUSTOM //!< Any possible configuration. 88 89 }; 89 90 … … 103 104 static void destroyJoySticks(); 104 105 105 static bool isModifierDown(KeyboardModifier::Enum modifier);106 static bool isKeyDown(KeyCode::Enum key);106 //static bool isModifierDown(KeyboardModifier::Enum modifier); 107 //static bool isKeyDown(KeyCode::Enum key); 107 108 //static const MouseState getMouseState(); 108 109 //static const JoyStickState getJoyStickState(unsigned int ID); … … 112 113 static void setInputState(const InputState state); 113 114 static InputState getInputState(); 115 116 static void storeKeyStroke(const std::string& name); 117 static const std::string& getLastKeyStroke(); 114 118 115 119 static bool addKeyHandler (KeyHandler* handler, const std::string& name); … … 172 176 173 177 private: // variables 174 OIS::InputManager* inputSystem_; //!< OIS input manager175 OIS::Keyboard* keyboard_; //!< OIS mouse176 OIS::Mouse* mouse_; //!< OIS keyboard177 std::vector<OIS::JoyStick*> joySticks_; //!< OIS joy sticks178 OIS::InputManager* inputSystem_; //!< OIS input manager 179 OIS::Keyboard* keyboard_; //!< OIS mouse 180 OIS::Mouse* mouse_; //!< OIS keyboard 181 std::vector<OIS::JoyStick*> joySticks_; //!< OIS joy sticks 178 182 unsigned int joySticksSize_; 183 184 KeyBinder* keyBinder_; //!< KeyBinder instance 185 KeyDetector* keyDetector_; //!< KeyDetector instance 186 InputBuffer* buffer_; //!< InputBuffer instance 179 187 180 188 InputState state_; 181 189 InputState stateRequest_; 182 190 unsigned int keyboardModifiers_; 191 std::string lastStroke_; 183 192 184 193 //! Keeps track of the joy stick POV states … … 194 203 std::vector<MouseHandler*> activeMouseHandlers_; 195 204 std::vector<std::vector<JoyStickHandler*> > activeJoyStickHandlers_; 196 std::vector< InputTickable*>activeHandlers_;205 std::vector<std::pair<InputTickable*, HandlerState> > activeHandlers_; 197 206 198 207 std::vector<Key> keysDown_;
Note: See TracChangeset
for help on using the changeset viewer.