Changeset 6067 for code/branches/particles2/src/modules
- Timestamp:
- Nov 15, 2009, 1:44:25 PM (15 years ago)
- Location:
- code/branches/particles2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/particles2
- Property svn:mergeinfo changed
/code/trunk (added) merged: 6054,6056-6057
- Property svn:mergeinfo changed
-
code/branches/particles2/src/modules/overlays/hud/HUDHealthBar.cc
r5929 r6067 48 48 this->textoverlay_ = new OverlayText(this); 49 49 50 assert(this->textoverlay_ );50 assert(this->textoverlay_.get()); 51 51 52 52 this->textoverlay_->setCaption(""); … … 56 56 { 57 57 if (this->isInitialized()) 58 { 58 59 this->textoverlay_->destroy(); 60 this->textoverlay_ = 0; 61 } 59 62 } 60 63 … … 106 109 SUPER(HUDHealthBar, changedOverlayGroup); 107 110 108 this->getOverlayGroup()->addElement(this->textoverlay_ );111 this->getOverlayGroup()->addElement(this->textoverlay_.get()); 109 112 } 110 113 -
code/branches/particles2/src/modules/overlays/hud/HUDHealthBar.h
r5929 r6067 112 112 private: 113 113 WeakPtr<Pawn> owner_; 114 OverlayText*textoverlay_;114 SmartPtr<OverlayText> textoverlay_; 115 115 bool bUseBarColour_; 116 116 ColourValue textColour_; -
code/branches/particles2/src/modules/overlays/hud/UnderAttackHealthBar.cc
r5929 r6067 34 34 #include "gametypes/UnderAttack.h" 35 35 #include "worldentities/pawns/Destroyer.h" 36 #include "overlays/OverlayGroup.h" 36 37 37 38 namespace orxonox … … 58 59 { 59 60 if (this->isInitialized()) 61 { 60 62 this->text_->destroy(); 63 this->text_ = 0; 64 } 61 65 } 62 66 … … 90 94 } 91 95 } 96 97 void UnderAttackHealthBar::changedOverlayGroup() 98 { 99 SUPER(UnderAttackHealthBar, changedOverlayGroup); 100 101 this->getOverlayGroup()->addElement(this->text_.get()); 102 } 92 103 93 104 void UnderAttackHealthBar::init() -
code/branches/particles2/src/modules/overlays/hud/UnderAttackHealthBar.h
r5929 r6067 46 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 47 47 virtual void changedOwner(); 48 virtual void changedOverlayGroup(); 48 49 49 50 inline void setDescriptionPickPoint(const Vector2& pickpoint) … … 61 62 62 63 PlayerInfo* owner_; 63 OverlayText*text_;64 SmartPtr<OverlayText> text_; 64 65 Timer inittimer_; 65 66 };
Note: See TracChangeset
for help on using the changeset viewer.