Changeset 6746 for code/trunk/src/libraries/core/input/InputManager.h
- Timestamp:
- Apr 16, 2010, 2:50:16 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/input/InputManager.h
r6417 r6746 36 36 #include <string> 37 37 #include <vector> 38 #include <boost/function.hpp> 38 39 39 40 #include "util/Singleton.h" 41 #include "util/TriBool.h" 40 42 #include "core/WindowEventListener.h" 41 #include "InputState.h"42 43 43 44 // tolua_begin … … 75 76 Nothing = 0x00, 76 77 Bad = 0x02, 77 Ticking = 0x04, 78 Calibrating = 0x08, 79 ReloadRequest = 0x10, 78 Calibrating = 0x04, 80 79 }; 81 80 … … 159 158 - The removal process is being postponed if InputManager::preUpdate() is currently running. 160 159 */ 161 bool destroyState(const std::string& name); 160 bool destroyState(const std::string& name); // tolua_export 162 161 163 162 //------------------------------- … … 169 168 //! Returns a pointer to the OIS InputManager. Only you if you know what you're doing! 170 169 OIS::InputManager* getOISInputManager() { return this->oisInputManager_; } 170 //! Returns the position of the cursor as std::pair of ints 171 171 std::pair<int, int> getMousePosition() const; 172 //! Tells whether the mouse is used exclusively to the game 173 bool isMouseExclusive() const { return this->exclusiveMouse_; } // tolua_export 174 175 //------------------------------- 176 // Function call caching 177 //------------------------------- 178 void pushCall(const boost::function<void ()>& function) 179 { this->callBuffer_.push_back(function); } 172 180 173 181 static InputManager& getInstance() { return Singleton<InputManager>::getInstance(); } // tolua_export … … 196 204 OIS::InputManager* oisInputManager_; //!< OIS input manager 197 205 std::vector<InputDevice*> devices_; //!< List of all input devices (keyboard, mouse, joy sticks) 198 MouseMode::Value mouseMode_;//!< Currently applied mouse mode206 TriBool::Value exclusiveMouse_; //!< Currently applied mouse mode 199 207 200 208 // some internally handled states and handlers … … 207 215 std::vector<InputState*> activeStatesTicked_; //!< Like activeStates_, but only contains the ones that currently receive events 208 216 209 std::set<InputState*> stateEnterRequests_; //!< Requests to enter a new state 210 std::set<InputState*> stateLeaveRequests_; //!< Requests to leave a running state 211 std::set<InputState*> stateDestroyRequests_; //!< Requests to destroy a state 217 std::vector<boost::function<void ()> > callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate) 212 218 213 219 static InputManager* singletonPtr_s; //!< Pointer reference to the singleton
Note: See TracChangeset
for help on using the changeset viewer.