Changeset 10239
- Timestamp:
- Feb 1, 2015, 8:50:08 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hudHS14/src/modules/overlays/hud/HUDNavigation.cc
r10163 r10239 377 377 378 378 //integer values from 0 to 10 (0 is no health and 10 is full health) 379 int discreteHealthScale = 10*relativHealthScale;379 int discreteHealthScale = (int)(10*relativHealthScale); 380 380 381 381 //calculate the HealthLevel (= OponentLevel or Strength) there are 5 Levels … … 407 407 //it->second.health_->setMaterialName(TextureGenerator::getMaterialName("bar2_1.png", it->first->getRadarObjectColour())); 408 408 it->second.health_->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", it->first->getRadarObjectColour())); 409 it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x , 0.75 *this->healthMarkerSize_ * this->getActualSize().y);409 it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x , 0.75f*this->healthMarkerSize_ * this->getActualSize().y); 410 410 it->second.wasOutOfView_ = false; 411 411 … … 414 414 if(1<=discreteHealthScale){ 415 415 it->second.health_->setTiling((float)discreteHealthScale , 1 ,0); 416 it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1 *discreteHealthScale, 0.75*this->healthMarkerSize_ * this->getActualSize().y);416 it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1f*discreteHealthScale, 0.75f*this->healthMarkerSize_ * this->getActualSize().y); 417 417 } 418 418 … … 421 421 //healthLevel 422 422 it->second.healthLevel_->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", it->first->getRadarObjectColour())); 423 it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x , 0.75 *this->healthLevelMarkerSize_ * this->getActualSize().y);423 it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x , 0.75f*this->healthLevelMarkerSize_ * this->getActualSize().y); 424 424 it->second.wasOutOfView_ = false; 425 425 it->second.healthLevel_->setTiling((float)HealthLevel , 1 ,0); 426 it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1 *HealthLevel, 0.25*this->healthLevelMarkerSize_ * this->getActualSize().y);426 it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1f*HealthLevel, 0.25f*this->healthLevelMarkerSize_ * this->getActualSize().y); 427 427 } 428 428 … … 439 439 if(1<=discreteHealthScale){ 440 440 it->second.health_->setTiling((float)discreteHealthScale , 1 ,0); 441 it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1 *discreteHealthScale, 0.75*this->healthMarkerSize_ * this->getActualSize().y);441 it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1f*discreteHealthScale, 0.75f*this->healthMarkerSize_ * this->getActualSize().y); 442 442 } 443 443 … … 450 450 451 451 it->second.healthLevel_->setTiling((float)HealthLevel , 1 ,0); 452 it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1 *HealthLevel, 0.25*this->healthLevelMarkerSize_ * this->getActualSize().y);452 it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1f*HealthLevel, 0.25f*this->healthLevelMarkerSize_ * this->getActualSize().y); 453 453 454 454
Note: See TracChangeset
for help on using the changeset viewer.