Changeset 6394 for code/branches/presentation2/src/modules/overlays/hud
- Timestamp:
- Dec 22, 2009, 2:07:44 PM (15 years ago)
- Location:
- code/branches/presentation2/src/modules/overlays/hud
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/modules/overlays/hud/HUDBar.cc
r6223 r6394 72 72 73 73 // create new material 74 std::stringmaterialname = "barmaterial" + multi_cast<std::string>(materialcount_s++);74 const std::string& materialname = "barmaterial" + multi_cast<std::string>(materialcount_s++); 75 75 Ogre::MaterialPtr material = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().create(materialname, "General")); 76 76 material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA); -
code/branches/presentation2/src/modules/overlays/hud/HUDHealthBar.h
r6054 r6394 53 53 54 54 inline void setTextFont(const std::string& font) 55 { if ( font != "") { this->textoverlay_->setFont(font); } }55 { if (!font.empty()) { this->textoverlay_->setFont(font); } } 56 56 inline const std::string& getTextFont() const 57 57 { return this->textoverlay_->getFont(); } -
code/branches/presentation2/src/modules/overlays/hud/HUDNavigation.cc
r6378 r6394 36 36 37 37 #include "util/Math.h" 38 #include "util/StringUtils.h"39 38 #include "util/Convert.h" 40 39 #include "core/CoreIncludes.h" … … 108 107 void HUDNavigation::setFont(const std::string& font) 109 108 { 110 if (this->navText_ && font != "")109 if (this->navText_ && !font.empty()) 111 110 this->navText_->setFontName(font); 112 111 } -
code/branches/presentation2/src/modules/overlays/hud/HUDRadar.cc
r5781 r6394 126 126 panel = *itRadarDots_; 127 127 ++itRadarDots_; 128 std::stringmaterialName = TextureGenerator::getMaterialName(128 const std::string& materialName = TextureGenerator::getMaterialName( 129 129 shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour()); 130 130 if (materialName != panel->getMaterialName()) -
code/branches/presentation2/src/modules/overlays/hud/TeamBaseMatchScore.cc
r5929 r6394 71 71 if (this->owner_) 72 72 { 73 std::string bases1 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(0)) + ")";74 std::string bases2 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(1)) + ")";73 const std::string& bases1 = '(' + multi_cast<std::string>(this->owner_->getTeamBases(0)) + ')'; 74 const std::string& bases2 = '(' + multi_cast<std::string>(this->owner_->getTeamBases(1)) + ')'; 75 75 76 std::stringscore1 = multi_cast<std::string>(this->owner_->getTeamPoints(0));77 std::stringscore2 = multi_cast<std::string>(this->owner_->getTeamPoints(1));76 const std::string& score1 = multi_cast<std::string>(this->owner_->getTeamPoints(0)); 77 const std::string& score2 = multi_cast<std::string>(this->owner_->getTeamPoints(1)); 78 78 79 79 std::string output1; … … 99 99 } 100 100 101 std::string output = "";101 std::string output; 102 102 if (this->bShowBases_ || this->bShowScore_) 103 103 { 104 104 if (this->bShowLeftTeam_ && this->bShowRightTeam_) 105 output = output1 + ":"+ output2;105 output = output1 + ':' + output2; 106 106 else if (this->bShowLeftTeam_ || this->bShowRightTeam_) 107 107 output = output1 + output2;
Note: See TracChangeset
for help on using the changeset viewer.