- Timestamp:
- Mar 31, 2010, 1:05:28 AM (15 years ago)
- Location:
- code/branches/gamestates2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestates2
- Property svn:mergeinfo changed
/code/branches/gamestate merged: 6621-6630,6655-6661
- Property svn:mergeinfo changed
-
code/branches/gamestates2/src/libraries/core/input/InputManager.h
r6595 r6662 36 36 #include <string> 37 37 #include <vector> 38 #include <boost/function.hpp> 38 39 39 40 #include "util/Singleton.h" 40 41 #include "util/TriBool.h" 41 42 #include "core/WindowEventListener.h" 42 #include "InputState.h"43 43 44 44 // tolua_begin … … 76 76 Nothing = 0x00, 77 77 Bad = 0x02, 78 Ticking = 0x04, 79 Calibrating = 0x08, 80 ReloadRequest = 0x10, 78 Calibrating = 0x04, 81 79 }; 82 80 … … 170 168 //! Returns a pointer to the OIS InputManager. Only you if you know what you're doing! 171 169 OIS::InputManager* getOISInputManager() { return this->oisInputManager_; } 170 //! Returns the position of the cursor as std::pair of ints 172 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); } 173 180 174 181 static InputManager& getInstance() { return Singleton<InputManager>::getInstance(); } // tolua_export … … 208 215 std::vector<InputState*> activeStatesTicked_; //!< Like activeStates_, but only contains the ones that currently receive events 209 216 210 std::set<InputState*> stateEnterRequests_; //!< Requests to enter a new state 211 std::set<InputState*> stateLeaveRequests_; //!< Requests to leave a running state 212 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) 213 218 214 219 static InputManager* singletonPtr_s; //!< Pointer reference to the singleton
Note: See TracChangeset
for help on using the changeset viewer.