Changeset 11071 for code/trunk/src/modules/overlays/stats
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/overlays/stats/CreateLines.cc
r6502 r11071 37 37 CreateLines::CreateLines(float leftOffset, float topOffset, float width, float height) 38 38 { 39 playerNameText_ = new OverlayText( 0);39 playerNameText_ = new OverlayText(nullptr); 40 40 playerNameText_->setTextSize(0.04f); 41 41 playerNameText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f)); 42 42 playerNameText_->setPosition(Vector2(0.1f, topOffset + 0.01f)); 43 43 44 scoreText_ = new OverlayText( 0);44 scoreText_ = new OverlayText(nullptr); 45 45 scoreText_->setTextSize(0.04f); 46 46 scoreText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f)); 47 47 scoreText_->setPosition(Vector2(0.6f, topOffset + 0.01f)); 48 48 49 deathsText_ = new OverlayText( 0);49 deathsText_ = new OverlayText(nullptr); 50 50 deathsText_->setTextSize(0.04f); 51 51 deathsText_->setColour(ColourValue(0, 0.75f, 0.2f, 1.0f)); 52 52 deathsText_->setPosition(Vector2(0.8f, topOffset + 0.01f)); 53 53 54 background_ = new Stats( 0);54 background_ = new Stats(nullptr); 55 55 background_->setPosition(Vector2(leftOffset, topOffset)); 56 56 background_->setSize(Vector2(width, height)); -
code/trunk/src/modules/overlays/stats/CreateLines.h
r5980 r11071 29 29 30 30 #include "overlays/OverlaysPrereqs.h" 31 32 #include <string> 31 33 32 34 namespace orxonox -
code/trunk/src/modules/overlays/stats/Scoreboard.cc
r9667 r11071 60 60 SUPER(Scoreboard, changedVisibility); 61 61 62 for ( unsigned int i = 0; i < this->lines_.size(); ++i)63 this->lines_[i]->changedVisibility();62 for (CreateLines* line : this->lines_) 63 line->changedVisibility(); 64 64 } 65 65 … … 94 94 95 95 unsigned int index = 0; 96 for ( std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it)96 for (const auto& mapEntry : playerList) 97 97 { 98 this->lines_[index]->setPlayerName(multi_cast<std::string>( it->first->getName()));99 this->lines_[index]->setScore(multi_cast<std::string>( it->second.frags_));100 this->lines_[index]->setDeaths(multi_cast<std::string>( it->second.killed_));98 this->lines_[index]->setPlayerName(multi_cast<std::string>(mapEntry.first->getName())); 99 this->lines_[index]->setScore(multi_cast<std::string>(mapEntry.second.frags_)); 100 this->lines_[index]->setDeaths(multi_cast<std::string>(mapEntry.second.killed_)); 101 101 index++; 102 102 } -
code/trunk/src/modules/overlays/stats/Scoreboard.h
r9667 r11071 44 44 virtual ~Scoreboard(); 45 45 46 virtual void tick(float dt) ;46 virtual void tick(float dt) override; 47 47 48 48 inline void setCreateLines(CreateLines* cl) … … 51 51 { return this->createlines_; } 52 52 53 virtual void changedVisibility() ;53 virtual void changedVisibility() override; 54 54 55 55 private: // functions -
code/trunk/src/modules/overlays/stats/Stats.cc
r9667 r11071 46 46 Stats::Stats(Context* context) 47 47 : OrxonoxOverlay(context) 48 , statsOverlayNoise_( 0)49 , statsOverlayBorder_( 0)48 , statsOverlayNoise_(nullptr) 49 , statsOverlayBorder_(nullptr) 50 50 { 51 51 RegisterObject(Stats); -
code/trunk/src/modules/overlays/stats/Stats.h
r9667 r11071 46 46 void setConfigValues(); 47 47 48 virtual void tick(float dt) ;48 virtual void tick(float dt) override; 49 49 50 50 private: // variables
Note: See TracChangeset
for help on using the changeset viewer.