Changeset 10791 for code/branches/fabienHS15/src/modules/overlays
- Timestamp:
- Nov 9, 2015, 5:55:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/fabienHS15/src/modules/overlays/hud/HUDWeaponMode.cc
r10739 r10791 73 73 this->textOverlayLeft_ = new OverlayText(this->getContext()); 74 74 assert(this->textOverlayLeft_.get()); 75 this->textOverlayLeft_->setCaption("? ??");75 this->textOverlayLeft_->setCaption("?"); 76 76 textOverlayLeft_->setPickPoint(Vector2(0.0f,0.0f)); 77 77 textOverlayLeft_->setVisible(true); … … 83 83 84 84 this->textOverlayRight_ = new OverlayText(this->getContext()); 85 assert(this->textOverlay Left_.get());86 this->textOverlayRight_->setCaption("? ??");85 assert(this->textOverlayRight_.get()); 86 this->textOverlayRight_->setCaption("?"); 87 87 textOverlayRight_->setPickPoint(Vector2(0.0f,0.0f)); 88 88 textOverlayRight_->setVisible(true); … … 93 93 textOverlayRight_->setZOrder(600); 94 94 95 materialNameState_ = "Orxonox/WSHUD_ Reloading";95 materialNameState_ = "Orxonox/WSHUD_Empty"; 96 96 97 97 overlayElementReplenish_->setMaterialName("Orxonox/WSHUD_Replenish"); … … 155 155 materialNameState_ = "Orxonox/WSHUD_Empty"; 156 156 } 157 } 158 159 if (munition->isA(Class(ReplenishingMunition)))160 {161 ReplenishingMunition* replenishingMunition = dynamic_cast<ReplenishingMunition*>(munition); 162 163 if (replenishingMunition->canAddMunition(1))164 {165 float progress = 1.0f - replenishingMunition->getProgress();166 overlayElementReplenish_->setDimensions(1.0f,progress);167 }168 else169 {170 overlayElementReplenish_->setDimensions(1.0f,1.0f);157 158 if (munition->isA(Class(ReplenishingMunition))) 159 { 160 ReplenishingMunition* replenishingMunition = dynamic_cast<ReplenishingMunition*>(munition); 161 162 if (replenishingMunition->canAddMunition(1)) 163 { 164 float progress = 1.0f - replenishingMunition->getProgress(); 165 overlayElementReplenish_->setDimensions(1.0f,progress); 166 } 167 else 168 { 169 overlayElementReplenish_->setDimensions(1.0f,1.0f); 170 } 171 171 } 172 172 }
Note: See TracChangeset
for help on using the changeset viewer.