Changeset 3292 for code/branches/core4/src/core/input/InputState.cc
- Timestamp:
- Jul 14, 2009, 1:59:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/core/input/InputState.cc
r3288 r3292 32 32 namespace orxonox 33 33 { 34 //! Sets priority of it's a high priority and resizes the handler list 34 35 InputState::InputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority) 35 36 : name_(name) … … 47 48 priority_ = 0; 48 49 49 handlers_.resize(InputDeviceEnumerator::FirstJoyStick + JoyStickQuantityListener::getJoyStickList().size(), NULL);50 handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL); 50 51 } 51 52 … … 58 59 } 59 60 61 //! Called by JoyStickQuantityListener upon joy stick adding/removal 60 62 void InputState::JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) 61 63 { … … 69 71 } 70 72 71 /**72 @brief73 Adds a joy stick handler.74 @param handler75 Pointer to the handler object.76 @param joyStickID77 ID of the joy stick78 @return79 True if added, false otherwise.80 */81 73 bool InputState::setJoyStickHandler(InputHandler* handler, unsigned int joyStick) 82 74 { … … 90 82 } 91 83 92 /** 93 @brief 94 Adds a joy stick handler. 95 @param handler 96 Pointer to the handler object. 97 @return 98 True if added, false if handler already existed. 99 */ 100 bool InputState::setJoyStickHandler(InputHandler* handler) 84 void InputState::setJoyStickHandler(InputHandler* handler) 101 85 { 102 86 joyStickHandlerAll_ = handler; … … 104 88 handlers_[i] = handler; 105 89 bExpired_ = true; 106 return true;107 90 } 108 91 109 /** 110 @brief 111 Adds a handler of any kind. dynamic_cast determines to which list it is added. 112 @param handler 113 Pointer to the handler object. 114 @return 115 True if added, false if handler already existed. 116 */ 117 bool InputState::setHandler(InputHandler* handler) 92 void InputState::setHandler(InputHandler* handler) 118 93 { 119 94 setKeyHandler(handler); 120 95 setMouseHandler(handler); 121 returnsetJoyStickHandler(handler);96 setJoyStickHandler(handler); 122 97 } 123 98
Note: See TracChangeset
for help on using the changeset viewer.