From b5512ba4e64329af3712c8bfbbc395be3933f353 Mon Sep 17 00:00:00 2001 From: madbad Date: Thu, 7 Dec 2023 17:14:42 +0000 Subject: [PATCH] OSGHUD: add tyre compound selection in dashboard menu git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9227 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: e3684e4800ce89448025347cf642e87b17c58bb7 Former-commit-id: dbb4c322c7d1c9662bba16de97c694ee57330301 --- .../graphic/osggraph/Viewer/OsgHUD.cpp | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp b/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp index 8bf991d38..7ecb41ad4 100644 --- a/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp +++ b/src/modules/graphic/osggraph/Viewer/OsgHUD.cpp @@ -67,6 +67,7 @@ static std::string strTireSet("New tires"); static std::string strFrontWing("Front wing"); static std::string strRearWing("Rear wing"); static std::string strPenalty("Next pit type"); +static std::string strTireCompounds("Tyre compound"); static const osg::Vec4 colorRed(1.0, 0.0, 0.0, 1.0); static const osg::Vec4 colorYellow(1.0, 0.878, 0.0, 1.0); @@ -1634,6 +1635,29 @@ void SDHUD::Refresh(tSituation *s, const SDFrameInfo* frameInfo, value1 << "NO"; } break; + case DI_COMPOUND_SET: + description = strTireCompounds; + if(item->setup->desired_value == 1) + { + value1 << "SOFT"; + } + else if (item->setup->desired_value == 2) + { + value1 << "MEDIUM"; + } + else if (item->setup->desired_value == 3) + { + value1 << "HARD"; + } + else if (item->setup->desired_value == 4) + { + value1 << "WET"; + } + else if (item->setup->desired_value == 5) + { + value1 << "EXTREME WET"; + } + break; case DI_FRONT_WING_ANGLE: description = strFrontWing; value1 << std::fixed << std::setprecision(1) << RAD2DEG(item->setup->desired_value);