[Orxonox-commit 4961] r9630 - code/branches/core6/src/orxonox/overlays
landauf at orxonox.net
landauf at orxonox.net
Fri Aug 9 21:28:06 CEST 2013
Author: landauf
Date: 2013-08-09 21:28:06 +0200 (Fri, 09 Aug 2013)
New Revision: 9630
Modified:
code/branches/core6/src/orxonox/overlays/OverlayGroup.cc
code/branches/core6/src/orxonox/overlays/OverlayGroup.h
Log:
propagate a new Gametype to all elements of an OverlayGroup (fixes issue with the Scoreboard within Gametype)
Modified: code/branches/core6/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/branches/core6/src/orxonox/overlays/OverlayGroup.cc 2013-08-09 19:26:46 UTC (rev 9629)
+++ code/branches/core6/src/orxonox/overlays/OverlayGroup.cc 2013-08-09 19:28:06 UTC (rev 9630)
@@ -149,6 +149,15 @@
(*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
}
+ //! Changes the gametype of all elements
+ void OverlayGroup::changedGametype()
+ {
+ SUPER( OverlayGroup, changedGametype );
+
+ for (std::set< SmartPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
+ (*it)->setGametype(this->getGametype());
+ }
+
void OverlayGroup::setOwner(BaseObject* owner)
{
this->owner_ = owner;
Modified: code/branches/core6/src/orxonox/overlays/OverlayGroup.h
===================================================================
--- code/branches/core6/src/orxonox/overlays/OverlayGroup.h 2013-08-09 19:26:46 UTC (rev 9629)
+++ code/branches/core6/src/orxonox/overlays/OverlayGroup.h 2013-08-09 19:28:06 UTC (rev 9630)
@@ -67,7 +67,8 @@
inline const std::set< SmartPtr<OrxonoxOverlay> >& getOverlays() const
{ return this->hudElements_; }
- void changedVisibility();
+ virtual void changedVisibility();
+ virtual void changedGametype();
void setOwner(BaseObject* owner);
inline BaseObject* getOwner() const
More information about the Orxonox-commit
mailing list