OSG-HUD: add brake temps to tires widget
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8898 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: c163018b147eaddb29b7edfc75038322d06312e3 Former-commit-id: 90f7a38662b5ee38f2c3270952ba8edf5993689f
This commit is contained in:
parent
1e5526ac2a
commit
ca124ab024
1 changed files with 18 additions and 4 deletions
|
@ -1662,8 +1662,6 @@ void SDHUD::Refresh(tSituation *s, const SDFrameInfo* frameInfo,
|
|||
prevSteerAngle = angle;
|
||||
|
||||
// tires temps
|
||||
|
||||
|
||||
for (int i = 0; i < 4; i++) { //for each tires
|
||||
|
||||
std::ostringstream tireName;
|
||||
|
@ -1757,12 +1755,28 @@ void SDHUD::Refresh(tSituation *s, const SDFrameInfo* frameInfo,
|
|||
tireNameText.str("");
|
||||
tireNameText << "tire-" << tireName.str().c_str() << "-pressures-unit";
|
||||
hudTextElements[tireNameText.str().c_str()]->setText(temp.str());
|
||||
|
||||
|
||||
//set brake temps
|
||||
float brakeTemp = currCar->_brakeTemp(i);
|
||||
|
||||
tireNameText.str("");
|
||||
tireNameText << "brake-" << tireName.str().c_str() << "-cold";
|
||||
changeImageAlpha(hudImgElements[tireNameText.str().c_str()], 1.0);
|
||||
|
||||
tireNameText.str("");
|
||||
tireNameText << "brake-" << tireName.str().c_str() << "-optimal";
|
||||
changeImageAlpha(hudImgElements[tireNameText.str().c_str()], (brakeTemp*2));
|
||||
|
||||
tireNameText.str("");
|
||||
tireNameText << "brake-" << tireName.str().c_str() << "-hot";
|
||||
changeImageAlpha(hudImgElements[tireNameText.str().c_str()], ((brakeTemp-0.5)*2));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// tire wear
|
||||
changeImageSize(hudImgElements["tire-fr-cold"], currCar->_tyreTreadDepth(0), "bottom", hudScale);
|
||||
changeImageSize(hudImgElements["tire-fr-optimal"], currCar->_tyreTreadDepth(0), "bottom", hudScale);
|
||||
|
|
Loading…
Reference in a new issue