Changeset 7932 for code/branches/hudimprovements/src/modules/overlays
- Timestamp:
- Feb 20, 2011, 4:53:43 PM (14 years ago)
- Location:
- code/branches/hudimprovements/src/modules/overlays/hud
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hudimprovements/src/modules/overlays/hud/HUDBar.cc
r7801 r7932 26 26 * Fabian 'x3n' Landau 27 27 * Reto Grieder 28 * Benjamin Knecht 28 29 * 29 30 */ -
code/branches/hudimprovements/src/modules/overlays/hud/HUDBar.h
r7401 r7932 26 26 * Fabian 'x3n' Landau 27 27 * Reto Grieder 28 * Benjamin Knecht 28 29 * 29 30 */ -
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); -
code/branches/hudimprovements/src/modules/overlays/hud/HUDBoostBar.h
r7920 r7932 47 47 48 48 private: 49 SpaceShip* owner_; 49 SpaceShip* owner_; 50 float flashInterval_; 51 float flashDt_; 50 52 }; 51 53 }
Note: See TracChangeset
for help on using the changeset viewer.