Changeset 10919 for code/branches/cpp11_v2/src/orxonox/overlays
- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
r10916 r10919 170 170 /*static*/ void OverlayGroup::toggleVisibility(const std::string& name) 171 171 { 172 for (O bjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it)173 { 174 if ( (*it)->getName() == name)175 (*it)->setVisible(!((*it)->isVisible()));172 for (OverlayGroup* group : ObjectList<OverlayGroup>()) 173 { 174 if (group->getName() == name) 175 group->setVisible(!(group->isVisible())); 176 176 } 177 177 } … … 185 185 /*static*/ void OverlayGroup::show(const std::string& name) 186 186 { 187 for (O bjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it)188 { 189 if ( (*it)->getName() == name)187 for (OverlayGroup* group : ObjectList<OverlayGroup>()) 188 { 189 if (group->getName() == name) 190 190 { 191 if( (*it)->isVisible())192 (*it)->changedVisibility();191 if(group->isVisible()) 192 group->changedVisibility(); 193 193 else 194 (*it)->setVisible(!((*it)->isVisible()));194 group->setVisible(!(group->isVisible())); 195 195 } 196 196 } … … 208 208 /*static*/ void OverlayGroup::scaleGroup(const std::string& name, float scale) 209 209 { 210 for (O bjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it)211 { 212 if ( (*it)->getName() == name)213 (*it)->scale(Vector2(scale, scale));210 for (OverlayGroup* group : ObjectList<OverlayGroup>()) 211 { 212 if (group->getName() == name) 213 group->scale(Vector2(scale, scale)); 214 214 } 215 215 } … … 226 226 /*static*/ void OverlayGroup::scrollGroup(const std::string& name, const Vector2& scroll) 227 227 { 228 for (O bjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it)229 { 230 if ( (*it)->getName() == name)231 (*it)->scroll(scroll);228 for (OverlayGroup* group : ObjectList<OverlayGroup>()) 229 { 230 if (group->getName() == name) 231 group->scroll(scroll); 232 232 } 233 233 }
Note: See TracChangeset
for help on using the changeset viewer.