Skip to content

Commit

Permalink
Merge pull request #80 from hpeter2/nofpl_color
Browse files Browse the repository at this point in the history
Departure Label background_color goes over nosid_color #57
  • Loading branch information
pierr3 authored Sep 14, 2020
2 parents 6413abc + 27e45c2 commit 61f873f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
5 changes: 2 additions & 3 deletions vSMR/InsetWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,12 @@ void CInsetWindow::render(HDC hDC, CSMRRadar * radar_screen, Graphics* gdi, POIN
definedBackgroundColor = radar_screen->CurrentConfig->getSidColor(TagReplacingMap["sid"], radar_screen->getActiveAirport());
}

if (fp.GetFlightPlanData().GetPlanType() == "I" && TagReplacingMap["asid"].empty() && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nosid_color")) {
if (fp.GetFlightPlanData().GetPlanType()[0] == 'I' && TagReplacingMap["asid"].empty() && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nosid_color")) {
definedBackgroundColor = radar_screen->CurrentConfig->getConfigColor(LabelsSettings[Utils::getEnumString(ColorTagType).c_str()]["nosid_color"]);
}

}
if (TagReplacingMap["actype"] == "NoFPL" && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nofpl_color")) {
definedBackgroundColor = radar_screen->CurrentConfig->getConfigColor(LabelsSettings[Utils::getEnumString(ColorTagType).c_str()]["nofpl_color"]);
}
}

Color TagBackgroundColor = radar_screen->RimcasInstance->GetAircraftColor(rt.GetCallsign(),
Expand Down
6 changes: 2 additions & 4 deletions vSMR/SMRRadar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2175,14 +2175,12 @@ void CSMRRadar::OnRefresh(HDC hDC, int Phase)
if (!TagReplacingMap["asid"].empty() && CurrentConfig->isSidColorAvail(TagReplacingMap["asid"], getActiveAirport())) {
definedBackgroundColor = CurrentConfig->getSidColor(TagReplacingMap["asid"], getActiveAirport());
}

if (fp.GetFlightPlanData().GetPlanType() == "I" && TagReplacingMap["asid"].empty() && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nosid_color")) {
if (fp.GetFlightPlanData().GetPlanType()[0] == 'I' && TagReplacingMap["asid"].empty() && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nosid_color")) {
definedBackgroundColor = CurrentConfig->getConfigColor(LabelsSettings[Utils::getEnumString(ColorTagType).c_str()]["nosid_color"]);
}

}
if (TagReplacingMap["actype"] == "NoFPL" && LabelsSettings[Utils::getEnumString(ColorTagType).c_str()].HasMember("nofpl_color")) {
definedBackgroundColor = CurrentConfig->getConfigColor(LabelsSettings[Utils::getEnumString(ColorTagType).c_str()]["nofpl_color"]);
}
}

Color TagBackgroundColor = RimcasInstance->GetAircraftColor(rt.GetCallsign(),
Expand Down
12 changes: 6 additions & 6 deletions vSMR/vSMR_Profiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@
"b": 200,
"a": 255
},
"nofpl_color": {
"r": 170,
"g": 50,
"b": 50,
"a": 255
},
"nosid_color": {
"r": 104,
"g": 50,
Expand Down Expand Up @@ -157,6 +151,12 @@
"r": 255,
"g": 255,
"b": 255
},
"nofpl_color": {
"r": 170,
"g": 50,
"b": 50,
"a": 255
}
}
},
Expand Down

0 comments on commit 61f873f

Please sign in to comment.