Changeset 5895
- Timestamp:
- Oct 6, 2009, 9:42:58 PM (15 years ago)
- Location:
- code/branches/core5/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/modules/overlays/hud/ChatOverlay.cc
r5831 r5895 58 58 ChatOverlay::~ChatOverlay() 59 59 { 60 for (std::set<Timer*>::iterator it = this->timers_.begin(); it != this->timers_.end(); ++it) 61 delete (*it); 60 62 } 61 63 … … 87 89 COUT(0) << "Chat: " << text << std::endl; 88 90 89 new Timer(this->displayTime_, false, createExecutor(createFunctor(&ChatOverlay::dropMessage, this)), true); 91 Timer* timer = new Timer(); 92 this->timers_.insert(timer); // store the timer in a set to destroy it in the destructor 93 Executor* executor = createExecutor(createFunctor(&ChatOverlay::dropMessage, this)); 94 executor->setDefaultValues(timer); 95 timer->setTimer(this->displayTime_, false, executor, true); 90 96 91 97 this->updateOverlayText(); 92 98 } 93 99 94 void ChatOverlay::dropMessage( )100 void ChatOverlay::dropMessage(Timer* timer) 95 101 { 96 102 if (this->messages_.size() > 0) 97 103 this->messages_.pop_front(); 98 104 this->updateOverlayText(); 105 this->timers_.erase(timer); // the timer destroys itself, but we have to remove it from the set 99 106 } 100 107 -
code/branches/core5/src/modules/overlays/hud/ChatOverlay.h
r5738 r5895 55 55 private: 56 56 void updateOverlayText(); 57 void dropMessage( );57 void dropMessage(Timer* timer); 58 58 59 59 float displayTime_; 60 std::set<Timer*> timers_; 60 61 }; 61 62 } -
code/branches/core5/src/orxonox/OrxonoxPrereqs.h
r5862 r5895 37 37 38 38 #include "OrxonoxConfig.h" 39 #include "tools/ToolsPrereqs.h" 39 40 40 41 //----------------------------------------------------------------------- -
code/branches/core5/src/orxonox/graphics/ParticleEmitter.h
r5858 r5895 34 34 #include <string> 35 35 #include "worldentities/StaticEntity.h" 36 #include "tools/ToolsPrereqs.h"37 36 38 37 namespace orxonox -
code/branches/core5/src/orxonox/interfaces/RadarViewable.h
r5858 r5895 38 38 #include "util/OgreForwardRefs.h" 39 39 #include "core/OrxonoxClass.h" 40 #include "tools/ToolsPrereqs.h"41 40 42 41 namespace orxonox
Note: See TracChangeset
for help on using the changeset viewer.