- Timestamp:
- Feb 20, 2011, 4:53:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hudimprovements/src/modules/overlays/hud/HUDBoostBar.cc
r7923 r7932 43 43 44 44 this->owner_ = 0; 45 this->flashInterval_ = 0.25f; 46 this->flashDt_ = 0.0f; 45 47 } 46 48 … … 55 57 if (this->owner_) 56 58 { 57 this->show(); 59 if (this->owner_->isBoostCoolingDown()) 60 { 61 this->setBackgroundColour(ColourValue(0.7f, 0.2f, 0.2f)); 62 if (this->flashDt_ <= 0.0f) 63 { 64 this->flashDt_ = this->flashInterval_; 65 this->setVisible(!this->isVisible()); 66 } 67 else 68 this->flashDt_ -= dt; 69 } 70 else 71 { 72 this->flashDt_ = 0.0f; 73 this->show(); 74 this->setBackgroundColour(ColourValue(0.2f, 0.7f, 0.2f)); 75 } 76 58 77 float value = this->owner_->getBoostPower() / this->owner_->getInitialBoostPower(); 59 78 this->setValue(value);
Note: See TracChangeset
for help on using the changeset viewer.