Changeset 1626 for code/trunk/src/orxonox/overlays/hud
- Timestamp:
- Jun 26, 2008, 4:05:31 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/overlays/hud
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/hud/HUDBar.cc
r1625 r1626 113 113 void HUDBar::setValue(float value) 114 114 { 115 if (value == this->value_)116 return;117 118 115 this->value_ = clamp<float>(value, 0, 1); 119 116 if (this->autoColour_ && this->textureUnitState_) -
code/trunk/src/orxonox/overlays/hud/HUDBar.h
r1625 r1626 72 72 73 73 inline void setRightToLeft(bool r2l) 74 { this->right2Left_ = r2l; }74 { this->right2Left_ = r2l; this->setValue(this->value_); } 75 75 inline bool getRightToLeft() const 76 76 { return this->right2Left_; } -
code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.cc
r1625 r1626 53 53 { 54 54 float v = ship->getVelocity().length(); 55 float vmax = ship->getMaxSpeed(); 56 this->setValue(v/vmax); 55 float value = v / ship->getMaxSpeed(); 56 if (value != this->getValue()) 57 this->setValue(value); 57 58 } 58 59 }
Note: See TracChangeset
for help on using the changeset viewer.