Changeset 1646 for code/branches/gui/src/core
- Timestamp:
- Jul 24, 2008, 10:40:22 PM (16 years ago)
- Location:
- code/branches/gui/src/core
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/core/Loader.cc
r1625 r1646 64 64 void Loader::add(const Level* level, const ClassTreeMask& mask) 65 65 { 66 if (!level) 67 return; 66 68 Loader::levels_s.insert(Loader::levels_s.end(), std::pair<const Level*, ClassTreeMask>(level, mask)); 67 69 } … … 69 71 void Loader::remove(const Level* level) 70 72 { 73 if (!level) 74 return; 71 75 for (std::vector<std::pair<const Level*, ClassTreeMask> >::iterator it = Loader::levels_s.begin(); it != Loader::levels_s.end(); ++it) 72 76 { … … 108 112 bool Loader::load(const Level* level, const ClassTreeMask& mask) 109 113 { 114 if (!level) 115 return false; 116 110 117 Loader::currentMask_s = level->getMask() * mask; 111 118 … … 165 172 void Loader::unload(const Level* level, const ClassTreeMask& mask) 166 173 { 174 if (!level) 175 return; 167 176 for (Iterator<BaseObject> it = ObjectList<BaseObject>::begin(); it; ) 168 177 { -
code/branches/gui/src/core/input/ExtendedInputState.h
r1642 r1646 47 47 class _CoreExport ExtendedInputState : public InputState 48 48 { 49 friend class InputManager; 50 friend class ClassFactory<ExtendedInputState>; 51 49 52 public: 50 ExtendedInputState();51 ~ExtendedInputState() { }52 53 53 bool addKeyHandler (KeyHandler* handler); 54 54 bool removeKeyHandler (KeyHandler* handler); … … 68 68 69 69 private: 70 ExtendedInputState(); 71 ~ExtendedInputState() { } 72 70 73 void tickInput(float dt); 71 74 void tickInput(float dt, unsigned int device); -
code/branches/gui/src/core/input/InputManager.cc
r1645 r1646 429 429 (*rit).second->onLeave(); 430 430 } 431 activeStates_.clear();432 _updateActiveStates();431 //activeStates_.clear(); 432 //_updateActiveStates(); 433 433 434 434 // destroy all input states … … 438 438 } 439 439 440 stateEmpty_ = 0;441 stateCalibrator_ = 0;442 stateDetector_ = 0;440 //stateEmpty_ = 0; 441 //stateCalibrator_ = 0; 442 //stateDetector_ = 0; 443 443 444 444 // destroy the devices … … 448 448 449 449 // 0 joy sticks now 450 _redimensionLists();450 //_redimensionLists(); 451 451 452 452 OIS::InputManager::destroyInputSystem(inputSystem_); 453 inputSystem_ = 0;453 //inputSystem_ = 0; 454 454 455 455 CCOUT(3) << "Destroying done." << std::endl; … … 509 509 { 510 510 assert(state); 511 std::map<int, InputState*>::iterator it = this->activeStates_.find(state->getPriority()); 512 if (it != this->activeStates_.end()) 513 { 514 this->activeStates_.erase(it); 515 _updateActiveStates(); 516 } 511 517 inputStatesByPriority_.erase(state->getPriority()); 512 518 inputStatesByName_.erase(state->getName()); -
code/branches/gui/src/core/input/InputState.h
r1642 r1646 51 51 52 52 public: 53 InputState() : priority_(0), executorOnEnter_(0), executorOnLeave_(0)54 { RegisterObject(InputState); }55 virtual ~InputState() { }56 57 53 const std::string& getName() const { return name_; } 58 54 int getPriority() const { return priority_; } … … 93 89 94 90 protected: 91 InputState() : priority_(0), executorOnEnter_(0), executorOnLeave_(0) 92 { RegisterObject(InputState); } 93 virtual ~InputState() { } 94 95 95 virtual void numberOfJoySticksChanged(unsigned int n) = 0; 96 96 void setInputDeviceEnabled(unsigned int device, bool bEnabled) -
code/branches/gui/src/core/input/SimpleInputState.h
r1642 r1646 45 45 class _CoreExport SimpleInputState : public InputState 46 46 { 47 friend class InputManager; 48 friend class ClassFactory<SimpleInputState>; 49 47 50 public: 48 SimpleInputState();49 ~SimpleInputState() { }50 51 51 void setKeyHandler (KeyHandler* handler) { keyHandler_ = handler; update(); } 52 52 void setMouseHandler (MouseHandler* handler) { mouseHandler_ = handler; update(); } … … 57 57 58 58 private: 59 SimpleInputState(); 60 ~SimpleInputState() { } 61 59 62 void tickInput(float dt); 60 63 void tickInput(float dt, unsigned int device);
Note: See TracChangeset
for help on using the changeset viewer.