Changeset 10555 for code/branches/core7/src/orxonox/overlays
- Timestamp:
- Aug 29, 2015, 5:35:59 PM (9 years ago)
- Location:
- code/branches/core7/src/orxonox/overlays
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/orxonox/overlays/OverlayGroup.cc
r10347 r10555 61 61 OverlayGroup::~OverlayGroup() 62 62 { 63 for (std::set< S martPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)63 for (std::set< StrongPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 64 64 (*it)->destroy(); 65 65 this->hudElements_.clear(); … … 85 85 void OverlayGroup::setScale(const Vector2& scale) 86 86 { 87 for (std::set< S martPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)87 for (std::set< StrongPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 88 88 (*it)->scale(scale / this->scale_); 89 89 this->scale_ = scale; … … 93 93 void OverlayGroup::setScroll(const Vector2& scroll) 94 94 { 95 for (std::set< S martPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)95 for (std::set< StrongPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 96 96 (*it)->scroll(scroll - this->scroll_); 97 97 this->scroll_ = scroll; … … 106 106 void OverlayGroup::addElement(OrxonoxOverlay* element) 107 107 { 108 hudElements_.insert(S martPtr<OrxonoxOverlay>(element));108 hudElements_.insert(StrongPtr<OrxonoxOverlay>(element)); 109 109 element->setOverlayGroup( this ); 110 110 if (this->owner_) … … 122 122 bool OverlayGroup::removeElement(OrxonoxOverlay* element) 123 123 { 124 if(this->hudElements_.erase(S martPtr<OrxonoxOverlay>(element)) == 0)124 if(this->hudElements_.erase(StrongPtr<OrxonoxOverlay>(element)) == 0) 125 125 return false; 126 126 return true; … … 132 132 if (index < this->hudElements_.size()) 133 133 { 134 std::set< S martPtr<OrxonoxOverlay> >::const_iterator it = hudElements_.begin();134 std::set< StrongPtr<OrxonoxOverlay> >::const_iterator it = hudElements_.begin(); 135 135 for (unsigned int i = 0; i != index; ++it, ++i) 136 136 ; … … 146 146 SUPER( OverlayGroup, changedVisibility ); 147 147 148 for (std::set< S martPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)148 for (std::set< StrongPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 149 149 (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed 150 150 } … … 155 155 SUPER( OverlayGroup, changedGametype ); 156 156 157 for (std::set< S martPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)157 for (std::set< StrongPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 158 158 (*it)->setGametype(this->getGametype()); 159 159 } … … 163 163 this->owner_ = owner; 164 164 165 for (std::set< S martPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)165 for (std::set< StrongPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 166 166 (*it)->setOwner(owner); 167 167 } -
code/branches/core7/src/orxonox/overlays/OverlayGroup.h
r9667 r10555 65 65 static void scrollGroup(const std::string& name, const Vector2& scroll); 66 66 67 inline const std::set< S martPtr<OrxonoxOverlay> >& getOverlays() const67 inline const std::set< StrongPtr<OrxonoxOverlay> >& getOverlays() const 68 68 { return this->hudElements_; } 69 69 … … 92 92 93 93 private: 94 std::set< S martPtr<OrxonoxOverlay> > hudElements_; //!< Contains all the OrxonoxOverlays of the this group.94 std::set< StrongPtr<OrxonoxOverlay> > hudElements_; //!< Contains all the OrxonoxOverlays of the this group. 95 95 Vector2 scale_; //!< Current scale (independent of the elements). 96 96 Vector2 scroll_; //!< Current scrolling offset.
Note: See TracChangeset
for help on using the changeset viewer.