- Timestamp:
- Mar 30, 2010, 12:13:33 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/src/libraries/core/input/InputManager.h
r6656 r6657 36 36 #include <string> 37 37 #include <vector> 38 #include <boost/function.hpp> 38 39 39 40 #include "util/Singleton.h" … … 75 76 Nothing = 0x00, 76 77 Bad = 0x02, 77 Ticking = 0x04, 78 Calibrating = 0x08, 79 ReloadRequest = 0x10, 78 Calibrating = 0x04, 80 79 }; 81 80 … … 171 170 std::pair<int, int> getMousePosition() const; 172 171 172 //------------------------------- 173 // Function call caching 174 //------------------------------- 175 void pushCall(const boost::function<void ()>& function) 176 { this->callBuffer_.push_back(function); } 177 173 178 static InputManager& getInstance() { return Singleton<InputManager>::getInstance(); } // tolua_export 174 179 … … 207 212 std::vector<InputState*> activeStatesTicked_; //!< Like activeStates_, but only contains the ones that currently receive events 208 213 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 214 std::vector<boost::function<void ()> > callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate) 212 215 213 216 static InputManager* singletonPtr_s; //!< Pointer reference to the singleton
Note: See TracChangeset
for help on using the changeset viewer.