Changeset 9257 for code/trunk/src/modules/overlays
- Timestamp:
- May 28, 2012, 12:28:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/overlays/hud/HUDNavigation.cc
r9016 r9257 79 79 this->setTextSize ( 0.05f ); 80 80 this->setNavMarkerSize ( 0.05f ); 81 this->setDetectionLimit( 10000.0f ); 81 this->setDetectionLimit( 10000.0f ); 82 82 } 83 83 … … 101 101 XMLPortParam ( HUDNavigation, "textSize", setTextSize, getTextSize, xmlelement, mode ); 102 102 XMLPortParam ( HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlelement, mode ); 103 XMLPortParam ( HUDNavigation, "detectionLimit", setDetectionLimit, getDetectionLimit, xmlelement, mode ); 103 XMLPortParam ( HUDNavigation, "detectionLimit", setDetectionLimit, getDetectionLimit, xmlelement, mode ); 104 104 } 105 105 … … 146 146 147 147 float HUDNavigation::getArrowSizeX(int dist) 148 { 149 if (dist < 600) 148 { 149 if (dist < 600) 150 150 dist = 600; 151 151 return this->getActualSize().x * 900 * navMarkerSize_ / dist; … … 153 153 154 154 float HUDNavigation::getArrowSizeY(int dist) 155 { 155 { 156 156 if (dist < 600) 157 dist = 600; 157 dist = 600; 158 158 return this->getActualSize().y * 900 * navMarkerSize_ / dist; 159 159 } … … 184 184 ObjectMap::iterator it = activeObjectList_.find ( listIt->first ); 185 185 closeEnough_ = listIt->second < detectionLimit_ ; 186 // display radarviewables on HUD if the marker limit and max-distance is not exceeded 187 if ( markerCount_ < markerLimit_ && (closeEnough_ || detectionLimit_ < 0) ) 186 // display radarviewables on HUD if the marker limit and max-distance is not exceeded 187 if ( markerCount_ < markerLimit_ && (closeEnough_ || detectionLimit_ < 0) ) 188 188 { 189 189 … … 201 201 //display name next to cursor 202 202 else{ 203 it->second.text_->setCaption(it->first->getR VName());204 textLength = it->first->getR VName().size() * it->second.text_->getCharHeight() * 0.3f;203 it->second.text_->setCaption(it->first->getRadarName()); 204 textLength = it->first->getRadarName().size() * it->second.text_->getCharHeight() * 0.3f; 205 205 } 206 206 … … 311 311 it->second.text_->show(); 312 312 } 313 else // do not display on HUD 313 else // do not display on HUD 314 314 { 315 315 it->second.panel_->hide();
Note: See TracChangeset
for help on using the changeset viewer.