pierr3 / vSMR

EuroScope Plugin to simulate the NOVA 9000 A-SMGCS system on VATSIM
GNU General Public License v3.0
67 stars 27 forks source link

Departure Label background_color goes over nosid_color #57 #80

Closed hpeter2 closed 3 years ago

hpeter2 commented 4 years ago

Explanation: Method CSMRRadar::OnRefresh, region tags does the following check: if (fp.GetFlightPlanData().GetPlanType() == "I" && TagReplacingMap["asid"].empty() && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nosid_color")) {...}

The first part of that mentioned check unfortunately never succeeds, even if the Flightplan-Type is IFR ('I'). (See attached screenshot) This can be fixed by changing this check to a character comparison: fp.GetFlightPlanData().GetPlanType()[0] == 'I'

The same has to be applied to method CInsetWindow::render of the Inset-Window.

"nofpl_color" will never be used, as the check is only applied on Departure tag types. Aircraft without a flightplan can't be defined as departing ones. The check if (TagReplacingMap["actype"] == "NoFPL" && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nofpl_color")) {...} should be outside and below the ColorTagType == TagTypes::Departure bracket (again, Radar & Inset)

The "nofpl_color" configuration has to be below Tag-Type "uncorrelated"

pierr3 commented 3 years ago

Thanks so much for this! Fixes #57