Changeset 1154 for code/branches/input/src/core/InputManager.cc
- Timestamp:
- Apr 24, 2008, 11:04:01 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/core/InputManager.cc
r1118 r1154 125 125 // create the handlers 126 126 this->handlerGUI_ = new InputHandlerGUI(); 127 this->handlerGUI_->initialise(); 127 128 this->handlerGame_ = new InputHandlerGame(); 128 //this->handlerBuffer_ = new InputBuffer(); 129 this->handlerGame_->loadBindings(); 130 131 /*COUT(ORX_DEBUG) << "*** InputManager: Loading key bindings..." << std::endl; 132 // load the key bindings 133 InputEvent empty = {0, false, 0, 0, 0}; 134 for (int i = 0; i < this->numberOfKeys_; i++) 135 this->bindingsKeyPressed_[i] = empty; 136 137 //assign 'abort' to the escape key 138 this->bindingsKeyPressed_[(int)OIS::KC_ESCAPE].id = 1; 129 this->handlerGame_->initialise(); 130 139 131 COUT(ORX_DEBUG) << "*** InputManager: Loading done." << std::endl;*/ 140 132 … … 159 151 this->inputSystem_ = 0; 160 152 161 if (this->handlerBuffer_)162 delete this->handlerBuffer_;163 153 if (this->handlerGame_) 164 154 delete this->handlerGame_; … … 166 156 delete this->handlerGUI_; 167 157 168 this->handlerBuffer_ = 0;169 158 this->handlerGame_ = 0; 170 159 this->handlerGUI_ = 0; … … 192 181 this->keyboard_->setEventCallback(this->handlerGame_); 193 182 break; 194 case IM_KEYBOARD:195 this->mouse_->setEventCallback(this->handlerGame_);196 this->keyboard_->setEventCallback(this->handlerBuffer_);197 break;198 183 case IM_UNINIT: 199 184 this->mouse_->setEventCallback(0); … … 211 196 212 197 // Give the listeners the chance to do additional calculations 198 this->currentHandler_->tick(dt); 213 199 } 214 200
Note: See TracChangeset
for help on using the changeset viewer.