Changeset 8309 for code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
- Timestamp:
- Apr 22, 2011, 11:05:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r7401 r8309 60 60 SetConsoleCommand("OrxonoxOverlay", "scrollOverlay", &OrxonoxOverlay::scrollOverlay); 61 61 SetConsoleCommand("OrxonoxOverlay", "toggleVisibility", &OrxonoxOverlay::toggleVisibility); 62 SetConsoleCommand("OrxonoxOverlay", "show", &OrxonoxOverlay::showOverlay); 62 63 SetConsoleCommand("OrxonoxOverlay", "rotateOverlay", &OrxonoxOverlay::rotateOverlay); 63 64 … … 341 342 } 342 343 } 344 345 /** 346 @brief 347 Shows Overlay by it's name. 348 @param name 349 The name of the overlay defined BaseObject::setName() (usually done with the "name" 350 attribute in the xml file). 351 */ 352 /*static*/ void OrxonoxOverlay::showOverlay(const std::string& name) 353 { 354 std::map<std::string, OrxonoxOverlay*>::const_iterator it = overlays_s.find(name); 355 if (it != overlays_s.end()) 356 { 357 OrxonoxOverlay* overlay= it->second; 358 if(overlay->isVisible()) 359 overlay->changedVisibility(); 360 else 361 overlay->show(); 362 } 363 } 343 364 344 365 /**
Note: See TracChangeset
for help on using the changeset viewer.