Changeset 11071 for code/trunk/src/libraries/core/input
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/input/Button.cc
r9983 r11071 53 53 Button::Button() 54 54 : bButtonThresholdUser_(false) 55 , paramCommandBuffer_( 0)55 , paramCommandBuffer_(nullptr) 56 56 { 57 57 nCommands_[0]=0; … … 75 75 delete commands_[j][i]; 76 76 delete[] commands_[j]; 77 commands_[j] = 0;77 commands_[j] = nullptr; 78 78 nCommands_[j] = 0; 79 79 } … … 196 196 197 197 // add command to the buffer if not yet existing 198 for ( unsigned int iParamCmd = 0; iParamCmd < paramCommandBuffer_->size(); iParamCmd++)199 { 200 if ( (*paramCommandBuffer_)[iParamCmd]->evaluation_.getConsoleCommand()198 for (BufferedParamCommand* command : *paramCommandBuffer_) 199 { 200 if (command->evaluation_.getConsoleCommand() 201 201 == eval.getConsoleCommand()) 202 202 { 203 203 // already in list 204 cmd->paramCommand_ = (*paramCommandBuffer_)[iParamCmd];204 cmd->paramCommand_ = command; 205 205 break; 206 206 } 207 207 } 208 if (cmd->paramCommand_ == 0)208 if (cmd->paramCommand_ == nullptr) 209 209 { 210 210 cmd->paramCommand_ = new BufferedParamCommand(); … … 239 239 } 240 240 else 241 commands_[j] = 0;241 commands_[j] = nullptr; 242 242 } 243 243 } -
code/trunk/src/libraries/core/input/HalfAxis.h
r7859 r11071 49 49 : relVal_(0.0f) 50 50 , absVal_(0.0f) 51 , paramCommands_( 0)51 , paramCommands_(nullptr) 52 52 , nParamCommands_(0) 53 53 , pressed_(false) … … 56 56 using Button::execute; 57 57 bool execute(); 58 bool addParamCommand(ParamCommand* command);59 v oid clear();58 virtual bool addParamCommand(ParamCommand* command) override; 59 virtual void clear() override; 60 60 void reset(); 61 61 -
code/trunk/src/libraries/core/input/InputBuffer.cc
r9667 r11071 75 75 InputBuffer::~InputBuffer() 76 76 { 77 for (std::list<BaseInputBufferListenerTuple*>::const_iterator it = this->listeners_.begin(); 78 it != this->listeners_.end(); ++it) 79 delete *it; 77 for (BaseInputBufferListenerTuple* listener : this->listeners_) 78 delete listener; 80 79 } 81 80 … … 110 109 void InputBuffer::insert(const std::string& input, bool update) 111 110 { 112 for ( unsigned int i = 0; i < input.size(); ++i)113 { 114 this->insert(input [i], false);111 for (const char& inputChar : input) 112 { 113 this->insert(inputChar, false); 115 114 116 115 if (update) 117 this->updated(input [i], false);116 this->updated(inputChar, false); 118 117 } 119 118 … … 170 169 void InputBuffer::updated() 171 170 { 172 for ( std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)173 { 174 if ( (*it)->bListenToAllChanges_)175 (*it)->callFunction();171 for (BaseInputBufferListenerTuple* listener : this->listeners_) 172 { 173 if (listener->bListenToAllChanges_) 174 listener->callFunction(); 176 175 } 177 176 } … … 179 178 void InputBuffer::updated(const char& update, bool bSingleInput) 180 179 { 181 for ( std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)182 { 183 if ((! (*it)->trueKeyFalseChar_) && ((*it)->bListenToAllChanges_ || ((*it)->char_ == update)) && (!(*it)->bOnlySingleInput_ || bSingleInput))184 (*it)->callFunction();180 for (BaseInputBufferListenerTuple* listener : this->listeners_) 181 { 182 if ((!listener->trueKeyFalseChar_) && (listener->bListenToAllChanges_ || (listener->char_ == update)) && (!listener->bOnlySingleInput_ || bSingleInput)) 183 listener->callFunction(); 185 184 } 186 185 } … … 201 200 return; 202 201 203 for ( std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)204 { 205 if ( (*it)->trueKeyFalseChar_ && ((*it)->key_ == evt.getKeyCode()))206 (*it)->callFunction();202 for (BaseInputBufferListenerTuple* listener : this->listeners_) 203 { 204 if (listener->trueKeyFalseChar_ && (listener->key_ == evt.getKeyCode())) 205 listener->callFunction(); 207 206 } 208 207 -
code/trunk/src/libraries/core/input/InputBuffer.h
r9667 r11071 47 47 trueKeyFalseChar_(trueKeyFalseChar), char_(_char), key_(key) 48 48 { } 49 virtual ~BaseInputBufferListenerTuple() { }49 virtual ~BaseInputBufferListenerTuple() = default; 50 50 virtual void callFunction() = 0; 51 51 bool bListenToAllChanges_; … … 65 65 listener_(listener), function_(function) 66 66 { } 67 virtual ~InputBufferListenerTuple() { }68 v oid callFunction()67 virtual ~InputBufferListenerTuple() = default; 68 virtual void callFunction() override 69 69 { 70 70 (listener_->*function_)(); … … 165 165 { if (this->cursor_ > 0) { --this->cursor_; } } 166 166 167 v oid buttonPressed(const KeyEvent& evt);167 virtual void buttonPressed(const KeyEvent& evt) override; 168 168 169 169 private: 170 170 bool charIsAllowed(const char& input); 171 171 172 v oid buttonHeld (const KeyEvent& evt);173 void processKey 172 virtual void buttonHeld (const KeyEvent& evt) override; 173 void processKey (const KeyEvent& evt); 174 174 175 v oid keyboardUpdated(float dt);175 virtual void keyboardUpdated(float dt) override; 176 176 177 177 std::string buffer_; -
code/trunk/src/libraries/core/input/InputCommands.h
r9978 r11071 57 57 public: 58 58 BaseCommand() : bFixedKeybindMode_(false) {} 59 virtual ~BaseCommand() { }59 virtual ~BaseCommand() = default; 60 60 61 61 virtual bool execute(float abs = 1.0f, float rel = 1.0f) = 0; … … 76 76 { 77 77 public: 78 bool execute(float abs = 1.0f, float rel = 1.0f);79 CommandEvaluation* getEvaluation();80 virtual SimpleCommand* clone() { return new SimpleCommand(*this); }78 virtual bool execute(float abs = 1.0f, float rel = 1.0f) override; 79 virtual CommandEvaluation* getEvaluation() override; 80 virtual SimpleCommand* clone() override { return new SimpleCommand(*this); } 81 81 82 82 CommandEvaluation evaluation_; … … 103 103 { 104 104 public: 105 ParamCommand() : scale_(1.0f), paramCommand_( 0) { }106 bool execute(float abs = 1.0f, float rel = 1.0f);107 CommandEvaluation* getEvaluation();108 virtual ParamCommand* clone() { return new ParamCommand(*this); }105 ParamCommand() : scale_(1.0f), paramCommand_(nullptr) { } 106 virtual bool execute(float abs = 1.0f, float rel = 1.0f) override; 107 virtual CommandEvaluation* getEvaluation() override; 108 virtual ParamCommand* clone() override { return new ParamCommand(*this); } 109 109 110 110 float scale_; … … 118 118 return &this->paramCommand_->evaluation_; 119 119 else 120 return 0;120 return nullptr; 121 121 } 122 122 } -
code/trunk/src/libraries/core/input/InputDevice.h
r8858 r11071 60 60 //! Only resets the members 61 61 InputDevice(unsigned int id) : bCalibrating_(false), deviceID_(id) { } 62 virtual ~InputDevice() { }62 virtual ~InputDevice() = default; 63 63 //! Returns the device class (derived) name as string 64 64 virtual std::string getClassName() const = 0; … … 99 99 100 100 private: 101 InputDevice(const InputDevice& rhs); //!< Don't use! 101 // non-copyable: 102 InputDevice(const InputDevice&) = delete; 103 InputDevice& operator=(const InputDevice&) = delete; 102 104 103 105 bool bCalibrating_; //!< Whether the device is in calibration mode … … 153 155 154 156 //! Captures OIS events (which then get distributed to the derived class) and creates the button held events 155 v oid update(const Clock& time)157 virtual void update(const Clock& time) override 156 158 { 157 159 oisDevice_->capture(); 158 160 159 161 // Call all the states with the held button event 160 for ( unsigned int iB = 0; iB < pressedButtons_.size(); ++iB)161 for ( unsigned int iS = 0; iS < inputStates_.size(); ++iS)162 inputStates_[iS]->buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(163 this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg( pressedButtons_[iB]));162 for (ButtonType& button : pressedButtons_) 163 for (InputState* state : inputStates_) 164 state->template buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>( 165 this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button)); 164 166 165 167 // Call states with device update events 166 for ( unsigned int i = 0; i < inputStates_.size(); ++i)167 inputStates_[i]->update(time.getDeltaTime(), this->getDeviceID());168 for (InputState* state : inputStates_) 169 state->update(time.getDeltaTime(), this->getDeviceID()); 168 170 169 171 static_cast<DeviceClass*>(this)->updateImpl(time); … … 171 173 172 174 //! Clears the list of pressed buttons and calls the derived class's method 173 v oid clearBuffers()175 virtual void clearBuffers() override 174 176 { 175 177 pressedButtons_.clear(); … … 180 182 OISDeviceClass* getOISDevice() { return this->oisDevice_; } 181 183 // Returns the name of the derived class as string 182 std::string getClassName() const{ return DeviceClass::getClassNameImpl(); }184 virtual std::string getClassName() const override { return DeviceClass::getClassNameImpl(); } 183 185 184 186 protected: … … 196 198 197 199 // Call states 198 for ( unsigned int i = 0; i < inputStates_.size(); ++i)199 inputStates_[i]->buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));200 for (InputState* state : inputStates_) 201 state->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button)); 200 202 } 201 203 … … 218 220 219 221 // Call states 220 for ( unsigned int i = 0; i < inputStates_.size(); ++i)221 inputStates_[i]->buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));222 for (InputState* state : inputStates_) 223 state->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button)); 222 224 } 223 225 -
code/trunk/src/libraries/core/input/InputHandler.h
r8729 r11071 119 119 { 120 120 public: 121 virtual ~InputHandler() { }121 virtual ~InputHandler() = default; 122 122 123 123 template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::TPress) -
code/trunk/src/libraries/core/input/InputManager.cc
r10624 r11071 39 39 #include <ois/OISException.h> 40 40 #include <ois/OISInputManager.h> 41 #include <boost/foreach.hpp>42 41 #include <loki/ScopeGuard.h> 43 42 … … 72 71 InputHandler InputHandler::EMPTY; 73 72 74 InputManager* InputManager::singletonPtr_s = 0;73 InputManager* InputManager::singletonPtr_s = nullptr; 75 74 76 75 //! Defines the |= operator for easier use. … … 94 93 InputManager::InputManager() 95 94 : internalState_(Bad) 96 , oisInputManager_( 0)95 , oisInputManager_(nullptr) 97 96 , devices_(2) 98 97 , exclusiveMouse_(false) 99 , emptyState_( 0)100 , calibratorCallbackHandler_( 0)98 , emptyState_(nullptr) 99 , calibratorCallbackHandler_(nullptr) 101 100 { 102 101 RegisterObject(InputManager); … … 149 148 // When loading the devices they should not already be loaded 150 149 assert(internalState_ & Bad); 151 assert(devices_[InputDeviceEnumerator::Mouse] == 0);152 assert(devices_[InputDeviceEnumerator::Keyboard] == 0);150 assert(devices_[InputDeviceEnumerator::Mouse] == nullptr); 151 assert(devices_[InputDeviceEnumerator::Keyboard] == nullptr); 153 152 assert(devices_.size() == InputDeviceEnumerator::FirstJoyStick); 154 153 … … 210 209 catch (const std::exception& ex) 211 210 { 212 oisInputManager_ = NULL;211 oisInputManager_ = nullptr; 213 212 internalState_ |= Bad; 214 213 ThrowException(InitialisationFailed, "Could not initialise the input system: " << ex.what()); … … 294 293 295 294 // Reset console commands 296 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject( 0);297 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject( 0);295 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(nullptr); 296 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(nullptr); 298 297 299 298 orxout(internal_status, context::input) << "InputManager: Destruction complete." << endl; … … 310 309 orxout(verbose, context::input) << "InputManager: Destroying devices..." << endl; 311 310 312 BOOST_FOREACH(InputDevice*& device,devices_)313 { 314 if (device == NULL)311 for (InputDevice*& device : devices_) 312 { 313 if (device == nullptr) 315 314 continue; 316 315 const std::string& className = device->getClassName(); 317 316 delete device; 318 device = 0;317 device = nullptr; 319 318 orxout(verbose, context::input) << className << " destroyed." << endl; 320 319 } 321 320 devices_.resize(InputDeviceEnumerator::FirstJoyStick); 322 321 323 assert(oisInputManager_ != NULL);322 assert(oisInputManager_ != nullptr); 324 323 try 325 324 { … … 331 330 << "Potential resource leak!" << endl; 332 331 } 333 oisInputManager_ = NULL;332 oisInputManager_ = nullptr; 334 333 335 334 internalState_ |= Bad; … … 374 373 // check whether a state has changed its EMPTY situation 375 374 bool bUpdateRequired = false; 376 for ( std::map<int, InputState*>::iterator it = activeStates_.begin(); it != activeStates_.end(); ++it)377 { 378 if ( it->second->hasExpired())379 { 380 it->second->resetExpiration();375 for (const auto& mapEntry : activeStates_) 376 { 377 if (mapEntry.second->hasExpired()) 378 { 379 mapEntry.second->resetExpiration(); 381 380 bUpdateRequired = true; 382 381 } … … 387 386 // Capture all the input and collect the function calls 388 387 // No event gets triggered here yet! 389 BOOST_FOREACH(InputDevice* device,devices_)390 if (device != NULL)388 for (InputDevice* device : devices_) 389 if (device != nullptr) 391 390 device->update(time); 392 391 393 392 // Collect function calls for the update 394 for ( unsigned int i = 0; i < activeStatesTicked_.size(); ++i)395 activeStatesTicked_[i]->update(time.getDeltaTime());393 for (InputState* state : activeStatesTicked_) 394 state->update(time.getDeltaTime()); 396 395 397 396 // Execute all cached function calls in order … … 402 401 // If we delay the calls, then OIS and and the InputStates are not anymore 403 402 // in the call stack and can therefore be edited. 404 for ( size_t i = 0; i < this->callBuffer_.size(); ++i)405 this->callBuffer_[i]();403 for (auto& function : this->callBuffer_) 404 function(); 406 405 407 406 this->callBuffer_.clear(); … … 419 418 for (unsigned int i = 0; i < devices_.size(); ++i) 420 419 { 421 if (devices_[i] == NULL)420 if (devices_[i] == nullptr) 422 421 continue; 423 422 std::vector<InputState*>& states = devices_[i]->getStateListRef(); … … 438 437 // Using an std::set to avoid duplicates 439 438 std::set<InputState*> tempSet; 440 for ( unsigned int i = 0; i < devices_.size(); ++i)441 if (device s_[i] != NULL)442 for (unsigned int iState = 0; iState < device s_[i]->getStateListRef().size(); ++iState)443 tempSet.insert(device s_[i]->getStateListRef()[iState]);439 for (InputDevice* device : devices_) 440 if (device != nullptr) 441 for (unsigned int iState = 0; iState < device->getStateListRef().size(); ++iState) 442 tempSet.insert(device->getStateListRef()[iState]); 444 443 445 444 // Copy the content of the std::set back to the actual vector 446 445 activeStatesTicked_.clear(); 447 for ( std::set<InputState*>::const_iterator it = tempSet.begin();it != tempSet.end(); ++it)448 activeStatesTicked_.push_back( *it);446 for (InputState* state : tempSet) 447 activeStatesTicked_.push_back(state); 449 448 450 449 // Check whether we have to change the mouse mode … … 466 465 void InputManager::clearBuffers() 467 466 { 468 BOOST_FOREACH(InputDevice* device,devices_)469 if (device != NULL)467 for (InputDevice* device : devices_) 468 if (device != nullptr) 470 469 device->clearBuffers(); 471 470 } … … 476 475 << "When done, put the axex in the middle position and press enter." << endl; 477 476 478 BOOST_FOREACH(InputDevice* device,devices_)479 if (device != NULL)477 for (InputDevice* device : devices_) 478 if (device != nullptr) 480 479 device->startCalibration(); 481 480 … … 487 486 void InputManager::stopCalibration() 488 487 { 489 BOOST_FOREACH(InputDevice* device,devices_)490 if (device != NULL)488 for (InputDevice* device : devices_) 489 if (device != nullptr) 491 490 device->stopCalibration(); 492 491 … … 509 508 { 510 509 Mouse* mouse = static_cast<Mouse*>(devices_[InputDeviceEnumerator::Mouse]); 511 if (mouse != NULL)510 if (mouse != nullptr) 512 511 { 513 512 const OIS::MouseState state = mouse->getOISDevice()->getMouseState(); … … 526 525 { 527 526 if (name.empty()) 528 return 0;527 return nullptr; 529 528 if (statesByName_.find(name) == statesByName_.end()) 530 529 { … … 532 531 { 533 532 // Make sure we don't add two high priority states with the same priority 534 for (std::map<std::string, InputState*>::const_iterator it = this->statesByName_.begin(); 535 it != this->statesByName_.end(); ++it) 533 for (const auto& mapEntry : this->statesByName_) 536 534 { 537 if ( it->second->getPriority() == priority)535 if (mapEntry.second->getPriority() == priority) 538 536 { 539 537 orxout(internal_warning, context::input) << "Could not add an InputState with the same priority '" 540 538 << static_cast<int>(priority) << "' != 0." << endl; 541 return 0;539 return nullptr; 542 540 } 543 541 } … … 551 549 { 552 550 orxout(internal_warning, context::input) << "Could not add an InputState with the same name '" << name << "'." << endl; 553 return 0;551 return nullptr; 554 552 } 555 553 } … … 561 559 return it->second; 562 560 else 563 return 0;561 return nullptr; 564 562 } 565 563 -
code/trunk/src/libraries/core/input/InputManager.h
r8729 r11071 35 35 #include <string> 36 36 #include <vector> 37 #include < boost/function.hpp>37 #include <functional> 38 38 39 39 #include "util/Singleton.h" … … 134 134 Returns a pointer to a InputState referenced by name. 135 135 @return 136 Returns NULLif state was not found.136 Returns nullptr if state was not found. 137 137 */ 138 138 InputState* getState(const std::string& name); … … 186 186 // Function call caching 187 187 //------------------------------- 188 void pushCall(const boost::function<void ()>& function)188 void pushCall(const std::function<void ()>& function) 189 189 { this->callBuffer_.push_back(function); } 190 190 … … 192 192 193 193 private: // functions 194 // don't mess with a Singleton 195 InputManager(const InputManager&); 194 // non-copyable: 195 InputManager(const InputManager&) = delete; 196 InputManager& operator=(const InputManager&) = delete; 196 197 197 198 // Internal methods … … 208 209 209 210 // From WindowEventListener 210 v oid windowFocusChanged(bool bFocus);211 virtual void windowFocusChanged(bool bFocus) override; 211 212 212 213 private: // variables … … 225 226 std::vector<InputState*> activeStatesTicked_; //!< Like activeStates_, but only contains the ones that currently receive events 226 227 227 std::vector< boost::function<void ()>> callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate)228 std::vector<std::function<void ()>> callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate) 228 229 229 230 static InputManager* singletonPtr_s; //!< Pointer reference to the singleton -
code/trunk/src/libraries/core/input/InputPrereqs.h
r8729 r11071 454 454 OrxEnumConstructors(InputStatePriority); 455 455 456 static const int Empty = -1;457 static const int Dynamic = 0;458 459 static const int HighPriority = 1000;460 static const int Console = HighPriority + 0;461 static const int Calibrator = HighPriority + 1;462 static const int Detector = HighPriority + 2;456 static constexpr int Empty = -1; 457 static constexpr int Dynamic = 0; 458 459 static constexpr int HighPriority = 1000; 460 static constexpr int Console = HighPriority + 0; 461 static constexpr int Calibrator = HighPriority + 1; 462 static constexpr int Detector = HighPriority + 2; 463 463 }; 464 464 } -
code/trunk/src/libraries/core/input/InputState.cc
r8729 r11071 40 40 , bExpired_(true) 41 41 , handlers_(2) 42 , joyStickHandlerAll_( 0)43 , enterFunctor_( 0)44 , leaveFunctor_( 0)42 , joyStickHandlerAll_(nullptr) 43 , enterFunctor_(nullptr) 44 , leaveFunctor_(nullptr) 45 45 { 46 46 if (priority >= InputStatePriority::HighPriority || priority == InputStatePriority::Empty) … … 49 49 priority_ = 0; 50 50 51 handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL);51 handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), nullptr); 52 52 } 53 53 … … 55 55 { 56 56 if (device < handlers_.size()) 57 return handlers_[device] != NULL;57 return handlers_[device] != nullptr; 58 58 else 59 59 return false; … … 64 64 { 65 65 unsigned int oldSize = handlers_.size(); 66 handlers_.resize(InputDeviceEnumerator::FirstJoyStick + joyStickList.size(), NULL);66 handlers_.resize(InputDeviceEnumerator::FirstJoyStick + joyStickList.size(), nullptr); 67 67 68 68 for (unsigned int i = oldSize; i < handlers_.size(); ++i) -
code/trunk/src/libraries/core/input/InputState.h
r8729 r11071 35 35 #include <string> 36 36 #include <vector> 37 #include <boost/function.hpp> 38 #include <boost/bind.hpp> 37 #include <functional> 39 38 40 39 #include "util/tribool.h" … … 44 43 45 44 #define INPUT_STATE_PUSH_CALL(deviceIndex, functionName, ...) \ 46 InputManager::getInstance().pushCall( boost::function<void ()>(boost::bind(&InputHandler::functionName, handlers_[deviceIndex], __VA_ARGS__)))45 InputManager::getInstance().pushCall(std::function<void ()>(std::bind(&InputHandler::functionName, handlers_[deviceIndex], __VA_ARGS__))) 47 46 48 47 namespace orxonox … … 156 155 private: 157 156 InputState(const std::string& name, bool bAlwaysGetsInput, bool bTransparent, InputStatePriority priority); 158 ~InputState() { }159 160 v oid JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList);157 ~InputState() = default; 158 159 virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) override; 161 160 162 161 //! Sets the priority (only to be used by the InputManager!) … … 179 178 { 180 179 for (unsigned int i = 0; i < handlers_.size(); ++i) 181 if (handlers_[i] != NULL)180 if (handlers_[i] != nullptr) 182 181 INPUT_STATE_PUSH_CALL(i, allDevicesUpdated, dt); 183 182 } … … 188 187 { 189 188 case InputDeviceEnumerator::Keyboard: 190 if (handlers_[keyboardIndex_s] != NULL)189 if (handlers_[keyboardIndex_s] != nullptr) 191 190 INPUT_STATE_PUSH_CALL(keyboardIndex_s, keyboardUpdated, dt); 192 191 break; 193 192 194 193 case InputDeviceEnumerator::Mouse: 195 if (handlers_[mouseIndex_s] != NULL)194 if (handlers_[mouseIndex_s] != nullptr) 196 195 INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseUpdated, dt); 197 196 break; 198 197 199 198 default: // joy sticks 200 if (handlers_[device] != NULL)199 if (handlers_[device] != nullptr) 201 200 INPUT_STATE_PUSH_CALL(device, joyStickUpdated, device - firstJoyStickIndex_s, dt); 202 201 break; … … 208 207 { 209 208 assert(device < handlers_.size()); 210 if (handlers_[device] != NULL)209 if (handlers_[device] != nullptr) 211 210 { 212 211 // We have to store the function pointer to tell the compiler about its actual type because of overloading 213 212 void (InputHandler::*function)(unsigned int, ButtonTypeParam, EventType) = &InputHandler::buttonEvent<ButtonTypeParam>; 214 InputManager::getInstance().pushCall( boost::function<void ()>(boost::bind(function, handlers_[device], device, button, EventType())));213 InputManager::getInstance().pushCall(std::function<void ()>(std::bind(function, handlers_[device], device, button, EventType()))); 215 214 } 216 215 } … … 218 217 ORX_FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) 219 218 { 220 if (handlers_[mouseIndex_s] != NULL)219 if (handlers_[mouseIndex_s] != nullptr) 221 220 INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseMoved, abs, rel, clippingSize); 222 221 } … … 224 223 ORX_FORCEINLINE void InputState::mouseScrolled(int abs, int rel) 225 224 { 226 if (handlers_[mouseIndex_s] != NULL)225 if (handlers_[mouseIndex_s] != nullptr) 227 226 INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseScrolled, abs, rel); 228 227 } … … 231 230 { 232 231 assert(device < handlers_.size()); 233 if (handlers_[device] != NULL)232 if (handlers_[device] != nullptr) 234 233 INPUT_STATE_PUSH_CALL(device, axisMoved, device - firstJoyStickIndex_s, axis, value); 235 234 } -
code/trunk/src/libraries/core/input/JoyStick.cc
r10624 r11071 31 31 #include <climits> 32 32 #include <ois/OISJoyStick.h> 33 #include <boost/foreach.hpp>34 33 35 34 #include "util/StringUtils.h" … … 73 72 //deviceName_ += multi_cast<std::string>(oisDevice_->getNumberOfComponents(OIS::OIS_Vector3)); 74 73 75 BOOST_FOREACH(std::string& idString,deviceNames_s)74 for (const std::string& idString : deviceNames_s) 76 75 { 77 76 if (deviceName_ == idString) … … 128 127 { 129 128 // Set initial values 130 BOOST_FOREACH(int& minVal,configMinValues_)129 for (int& minVal : configMinValues_) 131 130 minVal = INT_MAX; 132 BOOST_FOREACH(int& minVal,configMaxValues_)131 for (int& minVal : configMaxValues_) 133 132 minVal = INT_MIN; 134 BOOST_FOREACH(int& zeroVal,configZeroValues_)133 for (int& zeroVal : configZeroValues_) 135 134 zeroVal = 0; 136 135 } … … 187 186 void JoyStick::clearBuffersImpl() 188 187 { 189 for (int j = 0; j < 4; ++j)190 povStates_[j]= 0;188 for (int& state : povStates_) 189 state = 0; 191 190 } 192 191 … … 209 208 fValue *= negativeCoeffs_[axis]; 210 209 211 BOOST_FOREACH(InputState* state,inputStates_)210 for (InputState* state : inputStates_) 212 211 state->joyStickAxisMoved(this->getDeviceID(), axis, fValue); 213 212 } -
code/trunk/src/libraries/core/input/JoyStick.h
r9667 r11071 70 70 //! Assigns a generated ID string and loads the calibration (if present) 71 71 JoyStick(unsigned int id, OIS::InputManager* oisInputManager); 72 ~JoyStick() { }72 ~JoyStick() = default; 73 73 void setConfigValues(); 74 74 … … 77 77 78 78 private: 79 v oid calibrationStarted();80 v oid calibrationStopped();79 virtual void calibrationStarted() override; 80 virtual void calibrationStopped() override; 81 81 void evaluateCalibration(); 82 82 … … 86 86 87 87 //! OIS event handler 88 bool buttonPressed (const OIS::JoyStickEvent &arg, int button)88 virtual bool buttonPressed (const OIS::JoyStickEvent &arg, int button) override 89 89 { 90 90 super::buttonPressed(static_cast<JoyStickButtonCode::ByEnum>(button)); … … 93 93 94 94 //! OIS event handler 95 bool buttonReleased(const OIS::JoyStickEvent &arg, int button)95 virtual bool buttonReleased(const OIS::JoyStickEvent &arg, int button) override 96 96 { 97 97 super::buttonReleased(static_cast<JoyStickButtonCode::ByEnum>(button)); … … 99 99 } 100 100 101 bool axisMoved (const OIS::JoyStickEvent &arg, int axis);102 bool sliderMoved (const OIS::JoyStickEvent &arg, int id);103 bool povMoved (const OIS::JoyStickEvent &arg, int id);101 virtual bool axisMoved (const OIS::JoyStickEvent &arg, int axis) override; 102 virtual bool sliderMoved (const OIS::JoyStickEvent &arg, int id) override; 103 virtual bool povMoved (const OIS::JoyStickEvent &arg, int id) override; 104 104 //! OIS event handler (don't remove that because of OIS version issues!) 105 bool vector3Moved (const OIS::JoyStickEvent &arg, int id){ return true; }105 virtual bool vector3Moved (const OIS::JoyStickEvent &arg, int id) override { return true; } 106 106 107 107 //! Returns the class name as string -
code/trunk/src/libraries/core/input/JoyStickQuantityListener.cc
r10624 r11071 47 47 { 48 48 joyStickList_s = joyStickList; 49 for ( ObjectList<JoyStickQuantityListener>::iterator it = ObjectList<JoyStickQuantityListener>::begin(); it; ++it)50 it->JoyStickQuantityChanged(joyStickList);49 for (JoyStickQuantityListener* listener : ObjectList<JoyStickQuantityListener>()) 50 listener->JoyStickQuantityChanged(joyStickList); 51 51 } 52 52 } -
code/trunk/src/libraries/core/input/JoyStickQuantityListener.h
r9667 r11071 48 48 protected: 49 49 JoyStickQuantityListener(); 50 virtual ~JoyStickQuantityListener() { }50 virtual ~JoyStickQuantityListener() = default; 51 51 52 52 //! Returns a list with all JoySticks currently loaded -
code/trunk/src/libraries/core/input/KeyBinder.cc
r11052 r11071 53 53 : deriveTime_(0.0f) 54 54 , filename_(filename) 55 , configFile_( NULL)56 , fallbackConfigFile_( NULL)55 , configFile_(nullptr) 56 , fallbackConfigFile_(nullptr) 57 57 { 58 58 mouseRelative_[0] = 0; … … 153 153 void KeyBinder::buttonThresholdChanged() 154 154 { 155 for ( unsigned int i = 0; i < allHalfAxes_.size(); i++)156 if (! allHalfAxes_[i]->bButtonThresholdUser_)157 allHalfAxes_[i]->buttonThreshold_ = this->buttonThreshold_;155 for (HalfAxis* halfAxis : allHalfAxes_) 156 if (!halfAxis->bButtonThresholdUser_) 157 halfAxis->buttonThreshold_ = this->buttonThreshold_; 158 158 } 159 159 … … 170 170 171 171 // load the bindings if required 172 if (configFile_ != NULL)172 if (configFile_ != nullptr) 173 173 { 174 174 for (unsigned int iDev = oldValue; iDev < joySticks_.size(); ++iDev) … … 188 188 { 189 189 while (joyStickAxes_.size() < joySticks_.size()) 190 joyStickAxes_.push_back(s hared_ptr<JoyStickAxisVector>(new JoyStickAxisVector()));190 joyStickAxes_.push_back(std::make_shared<JoyStickAxisVector>()); 191 191 while (joyStickButtons_.size() < joySticks_.size()) 192 joyStickButtons_.push_back(s hared_ptr<JoyStickButtonVector>(new JoyStickButtonVector()));192 joyStickButtons_.push_back(std::make_shared<JoyStickButtonVector>()); 193 193 // For the case the new size is smaller 194 194 this->joyStickAxes_.resize(joySticks_.size()); … … 274 274 275 275 // Parse bindings and create the ConfigValueContainers if necessary 276 for ( std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)277 { 278 it->second->readBinding(this->configFile_, this->fallbackConfigFile_);279 addButtonToCommand( it->second->bindingString_, it->second);276 for (const auto& mapEntry : allButtons_) 277 { 278 mapEntry.second->readBinding(this->configFile_, this->fallbackConfigFile_); 279 addButtonToCommand(mapEntry.second->bindingString_, mapEntry.second); 280 280 } 281 281 … … 420 420 void KeyBinder::clearBindings() 421 421 { 422 for ( std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)423 it->second->clear();424 425 for ( unsigned int i = 0; i < paramCommandBuffer_.size(); i++)426 delete paramCommandBuffer_[i];422 for (const auto& mapEntry : allButtons_) 423 mapEntry.second->clear(); 424 425 for (BufferedParamCommand* command : paramCommandBuffer_) 426 delete command; 427 427 paramCommandBuffer_.clear(); 428 428 } … … 434 434 { 435 435 // iterate over all buttons 436 for ( std::map<std::string, Button*>::iterator it = this->allButtons_.begin(); it != this->allButtons_.end(); ++it)437 { 438 Button* button = it->second;436 for (const auto& mapEntry : this->allButtons_) 437 { 438 Button* button = mapEntry.second; 439 439 440 440 // iterate over all modes … … 479 479 { 480 480 delete[] button->commands_[mode_index]; 481 button->commands_[mode_index] = 0;481 button->commands_[mode_index] = nullptr; 482 482 } 483 483 … … 505 505 this->mousePosition_[1] = 0.0f; 506 506 507 for ( unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)508 mouseAxes_[i].reset();507 for (HalfAxis& axis : mouseAxes_) 508 axis.reset(); 509 509 } 510 510 … … 545 545 } 546 546 547 for ( unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)547 for (HalfAxis& axis : mouseAxes_) 548 548 { 549 549 // Why dividing relative value by dt? The reason lies in the simple fact, that when you … … 555 555 { 556 556 // just ignore if dt == 0.0 because we have multiplied by 0.0 anyway.. 557 mouseAxes_[i].relVal_ /= dt;558 } 559 560 tickHalfAxis( mouseAxes_[i]);557 axis.relVal_ /= dt; 558 } 559 560 tickHalfAxis(axis); 561 561 } 562 562 } -
code/trunk/src/libraries/core/input/KeyBinder.h
r11052 r11071 36 36 #include <vector> 37 37 #include <map> 38 #include < boost/shared_ptr.hpp>38 #include <memory> 39 39 40 40 #include "InputHandler.h" … … 85 85 void compilePointerLists(); 86 86 // from JoyStickQuantityListener interface 87 virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) ;88 89 v oid allDevicesUpdated(float dt);90 v oid mouseUpdated(float dt);91 v oid joyStickUpdated(unsigned int joyStick, float dt);87 virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) override; 88 89 virtual void allDevicesUpdated(float dt) override; 90 virtual void mouseUpdated(float dt) override; 91 virtual void joyStickUpdated(unsigned int joyStick, float dt) override; 92 92 // internal 93 93 void tickHalfAxis(HalfAxis& halfAxis); 94 94 95 v oid buttonPressed (const KeyEvent& evt);96 v oid buttonReleased(const KeyEvent& evt);97 v oid buttonHeld (const KeyEvent& evt);98 99 v oid buttonPressed (MouseButtonCode::ByEnum button);100 v oid buttonReleased(MouseButtonCode::ByEnum button);101 v oid buttonHeld (MouseButtonCode::ByEnum button);102 v oid mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);103 v oid mouseScrolled (int abs, int rel);104 105 v oid buttonPressed (unsigned int device, JoyStickButtonCode::ByEnum button);106 v oid buttonReleased(unsigned int device, JoyStickButtonCode::ByEnum button);107 v oid buttonHeld (unsigned int device, JoyStickButtonCode::ByEnum button);108 v oid axisMoved (unsigned int device, unsigned int axis, float value);95 virtual void buttonPressed (const KeyEvent& evt) override; 96 virtual void buttonReleased(const KeyEvent& evt) override; 97 virtual void buttonHeld (const KeyEvent& evt) override; 98 99 virtual void buttonPressed (MouseButtonCode::ByEnum button) override; 100 virtual void buttonReleased(MouseButtonCode::ByEnum button) override; 101 virtual void buttonHeld (MouseButtonCode::ByEnum button) override; 102 virtual void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize) override; 103 virtual void mouseScrolled (int abs, int rel) override; 104 105 virtual void buttonPressed (unsigned int device, JoyStickButtonCode::ByEnum button) override; 106 virtual void buttonReleased(unsigned int device, JoyStickButtonCode::ByEnum button) override; 107 virtual void buttonHeld (unsigned int device, JoyStickButtonCode::ByEnum button) override; 108 virtual void axisMoved (unsigned int device, unsigned int axis, float value) override; 109 109 110 110 protected: // variables … … 128 128 }; 129 129 //! Actual key bindings for joy stick buttons 130 std::vector<s hared_ptr<JoyStickButtonVector>> joyStickButtons_;130 std::vector<std::shared_ptr<JoyStickButtonVector>> joyStickButtons_; 131 131 //! Helper class to use something like std:vector<HalfAxis[48]> 132 132 struct JoyStickAxisVector … … 136 136 }; 137 137 //! Actual key bindings for joy stick axes (and sliders) 138 std::vector<s hared_ptr<JoyStickAxisVector>> joyStickAxes_;138 std::vector<std::shared_ptr<JoyStickAxisVector>> joyStickAxes_; 139 139 140 140 //! Pointer map with all Buttons, including half axes … … 143 143 std::vector<HalfAxis*> allHalfAxes_; 144 144 //! Maps input commands to all Button names, including half axes 145 std::map< std::string, std::vector<std::string> 145 std::map< std::string, std::vector<std::string>> allCommands_; 146 146 147 147 /** … … 160 160 //! Name of the file used in this KeyBinder (constant!) 161 161 const std::string filename_; 162 //! Config file used. NULLin case of KeyDetector. Also indicates whether we've already loaded.162 //! Config file used. nullptr in case of KeyDetector. Also indicates whether we've already loaded. 163 163 ConfigFile* configFile_; 164 164 //! Config file from the data directory that only serves as fallback … … 227 227 { 228 228 // execute all buffered bindings (additional parameter) 229 for ( unsigned int i = 0; i < paramCommandBuffer_.size(); i++)229 for (BufferedParamCommand* command : paramCommandBuffer_) 230 230 { 231 paramCommandBuffer_[i]->rel_ *= dt;232 paramCommandBuffer_[i]->execute();231 command->rel_ *= dt; 232 command->execute(); 233 233 } 234 234 235 235 // always reset the relative movement of the mouse 236 for ( unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)237 mouseAxes_[i].relVal_ = 0.0f;236 for (HalfAxis& axis : mouseAxes_) 237 axis.relVal_ = 0.0f; 238 238 } 239 239 }// tolua_export -
code/trunk/src/libraries/core/input/KeyBinderManager.cc
r10624 r11071 56 56 57 57 KeyBinderManager::KeyBinderManager() 58 : currentBinder_( NULL)58 : currentBinder_(nullptr) 59 59 , bDefaultFileLoaded_(true) 60 60 , bBinding_(false) … … 76 76 { 77 77 // Delete all remaining KeyBinders 78 for ( std::map<std::string, KeyBinder*>::const_iterator it = this->binders_.begin(); it != this->binders_.end(); ++it)79 delete it->second;78 for (const auto& mapEntry : this->binders_) 79 delete mapEntry.second; 80 80 81 81 // Reset console commands 82 ModifyConsoleCommand(__CC_keybind_name ).setObject( 0);83 ModifyConsoleCommand(__CC_tkeybind_name).setObject( 0);84 ModifyConsoleCommand(__CC_unbind_name ).setObject( 0);85 ModifyConsoleCommand(__CC_tunbind_name ).setObject( 0);82 ModifyConsoleCommand(__CC_keybind_name ).setObject(nullptr); 83 ModifyConsoleCommand(__CC_tkeybind_name).setObject(nullptr); 84 ModifyConsoleCommand(__CC_unbind_name ).setObject(nullptr); 85 ModifyConsoleCommand(__CC_tunbind_name ).setObject(nullptr); 86 86 } 87 87 … … 205 205 void KeyBinderManager::registerKeybindCallback(LuaFunctor* function) 206 206 { 207 this->callbackFunction_ = function;207 this->callbackFunction_.reset(function); 208 208 } 209 209 } -
code/trunk/src/libraries/core/input/KeyBinderManager.h
r9667 r11071 34 34 #include <map> 35 35 #include <string> 36 #include <memory> 36 37 37 38 #include "util/Singleton.h" … … 101 102 102 103 private: 103 KeyBinderManager(const KeyBinderManager&); 104 // non-copyable: 105 KeyBinderManager(const KeyBinderManager&) = delete; 106 KeyBinderManager& operator=(const KeyBinderManager&) = delete; 107 104 108 void keybindInternal(const std::string& command, bool bTemporary); 105 109 void keybindKeyPressed(const std::string& keyName); … … 107 111 108 112 // KeyBinder management 109 KeyBinder* currentBinder_; //! Currently selected KeyBinder (never NULL!)110 std::map<std::string, KeyBinder*> binders_; //! All loaded KeyBinders111 bool bDefaultFileLoaded_; //! Tells whether the default one is loaded112 std::string defaultFilename_; //! Name of the file with the default key bindings113 KeyBinder* currentBinder_; //! Currently selected KeyBinder (never nullptr!) 114 std::map<std::string, KeyBinder*> binders_; //! All loaded KeyBinders 115 bool bDefaultFileLoaded_; //! Tells whether the default one is loaded 116 std::string defaultFilename_; //! Name of the file with the default key bindings 113 117 114 118 // keybind command related 115 SharedPtr<LuaFunctor> callbackFunction_;//! Function to be called when key was pressed after "keybind" command116 bool bBinding_; //! Tells whether a key binding process is active117 bool bTemporary_; //! Stores tkeybind/keybind value118 std::string command_; //! Stores the command received by (t)keybind119 std::shared_ptr<LuaFunctor> callbackFunction_; //! Function to be called when key was pressed after "keybind" command 120 bool bBinding_; //! Tells whether a key binding process is active 121 bool bTemporary_; //! Stores tkeybind/keybind value 122 std::string command_; //! Stores the command received by (t)keybind 119 123 120 124 static KeyBinderManager* singletonPtr_s; -
code/trunk/src/libraries/core/input/KeyDetector.cc
r10624 r11071 62 62 KeyDetector::~KeyDetector() 63 63 { 64 inputState_->setHandler( NULL);64 inputState_->setHandler(nullptr); 65 65 InputManager::getInstance().destroyState("detector"); 66 66 ModifyConsoleCommand(__CC_KeyDetector_callback_name).resetFunction(); … … 70 70 { 71 71 // Assign every button/axis the same command, but with its name as argument 72 for ( std::map<std::string, Button*>::const_iterator it = allButtons_.begin(); it != allButtons_.end(); ++it)73 it->second->parse(__CC_KeyDetector_callback_name + ' ' + it->second->groupName_ + "." + it->second->name_);72 for (const auto& mapEntry : allButtons_) 73 mapEntry.second->parse(__CC_KeyDetector_callback_name + ' ' + mapEntry.second->groupName_ + "." + mapEntry.second->name_); 74 74 } 75 75 -
code/trunk/src/libraries/core/input/KeyDetector.h
r8729 r11071 48 48 49 49 private: 50 KeyDetector(const KeyDetector&); 50 // non-copyable: 51 KeyDetector(const KeyDetector&) = delete; 52 KeyDetector& operator=(const KeyDetector&) = delete; 51 53 52 54 void callback(const std::string& name); 53 v oid JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList);55 virtual void JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList) override; 54 56 void assignCommands(); 55 57 -
code/trunk/src/libraries/core/input/Keyboard.h
r8729 r11071 63 63 //! Only resets the keyboard modifiers. Initialising is done in the base class. 64 64 Keyboard(unsigned int id, OIS::InputManager* oisInputManager) : super(id, oisInputManager), modifiers_(0) { } 65 ~Keyboard() { }65 ~Keyboard() = default; 66 66 67 67 private: … … 75 75 } 76 76 77 bool keyPressed(const OIS::KeyEvent& arg);78 bool keyReleased(const OIS::KeyEvent& arg);77 virtual bool keyPressed(const OIS::KeyEvent& arg) override; 78 virtual bool keyReleased(const OIS::KeyEvent& arg) override; 79 79 80 80 //! Returns the class name as string -
code/trunk/src/libraries/core/input/Mouse.cc
r10624 r11071 68 68 { 69 69 #ifdef ORXONOX_PLATFORM_LINUX 70 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject( 0);71 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject( 0);70 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject(nullptr); 71 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject(nullptr); 72 72 #endif 73 73 } … … 82 82 IntVector2 rel(e.state.X.rel, e.state.Y.rel); 83 83 IntVector2 clippingSize(e.state.width, e.state.height); 84 for ( unsigned int i = 0; i < inputStates_.size(); ++i)85 inputStates_[i]->mouseMoved(abs, rel, clippingSize);84 for (InputState* state : inputStates_) 85 state->mouseMoved(abs, rel, clippingSize); 86 86 } 87 87 … … 89 89 if (e.state.Z.rel != 0) 90 90 { 91 for ( unsigned int i = 0; i < inputStates_.size(); ++i)92 inputStates_[i]->mouseScrolled(e.state.Z.abs, e.state.Z.rel);91 for (InputState* state : inputStates_) 92 state->mouseScrolled(e.state.Z.abs, e.state.Z.rel); 93 93 } 94 94 -
code/trunk/src/libraries/core/input/Mouse.h
r7809 r11071 74 74 private: 75 75 //! OIS event handler 76 bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id)76 virtual bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id) override 77 77 { 78 78 super::buttonPressed(static_cast<MouseButtonCode::ByEnum>(id)); … … 81 81 82 82 //! OIS event handler 83 bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id)83 virtual bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id) override 84 84 { 85 85 super::buttonReleased(static_cast<MouseButtonCode::ByEnum>(id)); … … 87 87 } 88 88 89 bool mouseMoved(const OIS::MouseEvent &arg);89 virtual bool mouseMoved(const OIS::MouseEvent &arg) override; 90 90 91 v oid windowResized(unsigned int newWidth, unsigned int newHeight);91 virtual void windowResized(unsigned int newWidth, unsigned int newHeight) override; 92 92 93 93 // Returns the class name as string
Note: See TracChangeset
for help on using the changeset viewer.