Changeset 10769 for code/branches/cpp11_v2/src/orxonox/overlays
- Timestamp:
- Nov 7, 2015, 10:23:42 AM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/orxonox/overlays
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
r10768 r10769 62 62 OverlayGroup::~OverlayGroup() 63 63 { 64 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)64 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 65 65 (*it)->destroy(); 66 66 this->hudElements_.clear(); … … 86 86 void OverlayGroup::setScale(const Vector2& scale) 87 87 { 88 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)88 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 89 89 (*it)->scale(scale / this->scale_); 90 90 this->scale_ = scale; … … 94 94 void OverlayGroup::setScroll(const Vector2& scroll) 95 95 { 96 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)96 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 97 97 (*it)->scroll(scroll - this->scroll_); 98 98 this->scroll_ = scroll; … … 133 133 if (index < this->hudElements_.size()) 134 134 { 135 std::set< StrongPtr<OrxonoxOverlay>>::const_iterator it = hudElements_.begin();135 std::set<StrongPtr<OrxonoxOverlay>>::const_iterator it = hudElements_.begin(); 136 136 for (unsigned int i = 0; i != index; ++it, ++i) 137 137 ; … … 147 147 SUPER( OverlayGroup, changedVisibility ); 148 148 149 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)149 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 150 150 (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed 151 151 } … … 155 155 this->owner_ = owner; 156 156 157 for (std::set< StrongPtr<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)->setOwner(owner); 159 159 } -
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.h
r10624 r10769 65 65 static void scrollGroup(const std::string& name, const Vector2& scroll); 66 66 67 inline const std::set< StrongPtr<OrxonoxOverlay>>& getOverlays() const67 inline const std::set<StrongPtr<OrxonoxOverlay>>& getOverlays() const 68 68 { return this->hudElements_; } 69 69 … … 91 91 92 92 private: 93 std::set< StrongPtr<OrxonoxOverlay>> hudElements_; //!< Contains all the OrxonoxOverlays of the this group.93 std::set<StrongPtr<OrxonoxOverlay>> hudElements_; //!< Contains all the OrxonoxOverlays of the this group. 94 94 Vector2 scale_; //!< Current scale (independent of the elements). 95 95 Vector2 scroll_; //!< Current scrolling offset.
Note: See TracChangeset
for help on using the changeset viewer.