Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 15, 2009, 1:44:25 PM (15 years ago)
Author:
rgrieder
Message:

Merged revisions 6054, 6056 and 6057 to particles2 branch.

Location:
code/branches/particles2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particles2

  • code/branches/particles2/src/modules/overlays/hud/HUDHealthBar.cc

    r5929 r6067  
    4848        this->textoverlay_ = new OverlayText(this);
    4949
    50         assert(this->textoverlay_);
     50        assert(this->textoverlay_.get());
    5151
    5252        this->textoverlay_->setCaption("");
     
    5656    {
    5757        if (this->isInitialized())
     58        {
    5859            this->textoverlay_->destroy();
     60            this->textoverlay_ = 0;
     61        }
    5962    }
    6063
     
    106109        SUPER(HUDHealthBar, changedOverlayGroup);
    107110
    108         this->getOverlayGroup()->addElement(this->textoverlay_);
     111        this->getOverlayGroup()->addElement(this->textoverlay_.get());
    109112    }
    110113
  • code/branches/particles2/src/modules/overlays/hud/HUDHealthBar.h

    r5929 r6067  
    112112        private:
    113113            WeakPtr<Pawn> owner_;
    114             OverlayText* textoverlay_;
     114            SmartPtr<OverlayText> textoverlay_;
    115115            bool bUseBarColour_;
    116116            ColourValue textColour_;
  • code/branches/particles2/src/modules/overlays/hud/UnderAttackHealthBar.cc

    r5929 r6067  
    3434#include "gametypes/UnderAttack.h"
    3535#include "worldentities/pawns/Destroyer.h"
     36#include "overlays/OverlayGroup.h"
    3637
    3738namespace orxonox
     
    5859    {
    5960        if (this->isInitialized())
     61        {
    6062            this->text_->destroy();
     63            this->text_ = 0;
     64        }
    6165    }
    6266
     
    9094        }
    9195    }
     96   
     97    void UnderAttackHealthBar::changedOverlayGroup()
     98    {
     99        SUPER(UnderAttackHealthBar, changedOverlayGroup);
     100       
     101        this->getOverlayGroup()->addElement(this->text_.get());
     102    }
    92103
    93104    void UnderAttackHealthBar::init()
  • code/branches/particles2/src/modules/overlays/hud/UnderAttackHealthBar.h

    r5929 r6067  
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4747            virtual void changedOwner();
     48            virtual void changedOverlayGroup();
    4849
    4950            inline void setDescriptionPickPoint(const Vector2& pickpoint)
     
    6162
    6263            PlayerInfo* owner_;
    63             OverlayText* text_;
     64            SmartPtr<OverlayText> text_;
    6465            Timer inittimer_;
    6566    };
Note: See TracChangeset for help on using the changeset viewer.