Changeset 2800 for code/branches/gui/src/core/input/InputManager.cc
- Timestamp:
- Mar 19, 2009, 10:34:54 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/core/input/InputManager.cc
r2662 r2800 43 43 44 44 #include "util/Exception.h" 45 #include "core/Clock.h" 45 46 #include "core/CoreIncludes.h" 46 47 #include "core/ConfigValueIncludes.h" … … 670 671 @brief 671 672 Public interface. Only reloads immediately if the call stack doesn't 672 include the tick() method.673 include the update() method. 673 674 @param joyStickSupport 674 675 Whether or not to initialise joy sticks as well. … … 742 743 @brief 743 744 Updates the states and the InputState situation. 744 @param dt745 Delta time746 */ 747 void InputManager:: tick(float dt)745 @param time 746 Clock holding the current time. 747 */ 748 void InputManager::update(const Clock& time) 748 749 { 749 750 if (internalState_ == Uninitialised) … … 849 850 } 850 851 851 // tickthe handlers for each active handler852 // update the handlers for each active handler 852 853 for (unsigned int i = 0; i < devicesNum_; ++i) 853 854 { 854 activeStatesTop_[i]-> tickInput(dt, i);855 activeStatesTop_[i]->updateInput(time.getDeltaTime(), i); 855 856 if (stateMaster_->isInputDeviceEnabled(i)) 856 stateMaster_-> tickInput(dt, i);857 } 858 859 // tickthe handler with a general tick afterwards857 stateMaster_->updateInput(time.getDeltaTime(), i); 858 } 859 860 // update the handler with a general tick afterwards 860 861 for (unsigned int i = 0; i < activeStatesTicked_.size(); ++i) 861 activeStatesTicked_[i]-> tickInput(dt);862 stateMaster_-> tickInput(dt);862 activeStatesTicked_[i]->updateInput(time.getDeltaTime()); 863 stateMaster_->updateInput(time.getDeltaTime()); 863 864 } 864 865 … … 869 870 @brief 870 871 Updates the currently active states (according to activeStates_) for each device. 871 Also, a list of all active states (no duplicates!) is compiled for the general tick.872 Also, a list of all active states (no duplicates!) is compiled for the general update(). 872 873 */ 873 874 void InputManager::_updateActiveStates() … … 1290 1291 @remarks 1291 1292 You can't remove the internal states "empty", "calibrator" and "detector". 1292 The removal process is being postponed if InputManager:: tick() is currently running.1293 The removal process is being postponed if InputManager::update() is currently running. 1293 1294 */ 1294 1295 bool InputManager::requestDestroyState(const std::string& name)
Note: See TracChangeset
for help on using the changeset viewer.