Changeset 8309 for code/trunk/src/orxonox/overlays/OverlayGroup.cc
- Timestamp:
- Apr 22, 2011, 11:05:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/OverlayGroup.cc
r7401 r8309 44 44 45 45 SetConsoleCommand("OverlayGroup", "toggleVisibility", &OverlayGroup::toggleVisibility); 46 SetConsoleCommand("OverlayGroup", "show", &OverlayGroup::show); 46 47 SetConsoleCommand("OverlayGroup", "scaleGroup", &OverlayGroup::scaleGroup); 47 48 SetConsoleCommand("OverlayGroup", "scrollGroup", &OverlayGroup::scrollGroup); … … 174 175 } 175 176 } 177 178 /** 179 @brief 180 Shows an overlay group by its name. 181 @param name 182 The name of the group defined BaseObject::setName() (usually done with the "name" attribute in the xml file). 183 */ 184 /*static*/ void OverlayGroup::show(const std::string& name) 185 { 186 for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it) 187 { 188 if ((*it)->getName() == name) 189 { 190 if((*it)->isVisible()) 191 (*it)->changedVisibility(); 192 else 193 (*it)->setVisible(!((*it)->isVisible())); 194 } 195 } 196 } 176 197 177 198 /**
Note: See TracChangeset
for help on using the changeset viewer.