Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 9, 2013, 9:28:06 PM (11 years ago)
Author:
landauf
Message:

propagate a new Gametype to all elements of an OverlayGroup (fixes issue with the Scoreboard within Gametype)

Location:
code/branches/core6/src/orxonox/overlays
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/orxonox/overlays/OverlayGroup.cc

    r9629 r9630  
    148148        for (std::set< SmartPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
    149149            (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
     150    }
     151
     152    //! Changes the gametype of all elements
     153    void OverlayGroup::changedGametype()
     154    {
     155        SUPER( OverlayGroup, changedGametype );
     156
     157        for (std::set< SmartPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
     158            (*it)->setGametype(this->getGametype());
    150159    }
    151160
  • code/branches/core6/src/orxonox/overlays/OverlayGroup.h

    r9629 r9630  
    6868            { return this->hudElements_; }
    6969
    70         void changedVisibility();
     70        virtual void changedVisibility();
     71        virtual void changedGametype();
    7172
    7273        void setOwner(BaseObject* owner);
Note: See TracChangeset for help on using the changeset viewer.