Skip to content

Commit

Permalink
Implement AIW and emergency aircraft icon color overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
EightSmart committed Jul 1, 2024
1 parent baabcd5 commit 62f7ca2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions AT3/AT3RadarTargetDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ void AT3RadarTargetDisplay::OnRefresh(HDC hDC, int Phase, HKCPDisplay* Display)
dc.SetTextColor(DEFAULT_REDUNDANT.ToCOLORREF());
}

// Override aircraft color conditions
if (fp.GetSectorEntryMinutes() <= 1 && fp.GetSectorEntryMinutes() >= 0 && strlen(fp.GetTrackingControllerId()) == 0) {
aircraftBrush.SetColor(OVERRIDE_AIW);
}
if (strcmp(pd.GetSquawk(), "7700") == 0) {
aircraftBrush.SetColor(OVERRIDE_EMER);
}

// Get and set location
POINT acftLocation = Display->ConvertCoordFromPositionToPixel(acft.GetPosition().GetPosition());
PointF acftLabelLocation = PointF(acftLocation.x, acftLocation.y + 15);
Expand Down
2 changes: 2 additions & 0 deletions Constant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ const COLORREF BUTTON_GREY = RGB(140, 140, 140);
const Gdiplus::Color DEFAULT_ASSUMED = Gdiplus::Color(241, 246, 255);
const Gdiplus::Color DEFAULT_UNCONCERNED = Gdiplus::Color(117, 132, 142);
const Gdiplus::Color DEFAULT_REDUNDANT = Gdiplus::Color(229, 214, 130);
const Gdiplus::Color OVERRIDE_AIW = Gdiplus::Color(255, 158, 112);
const Gdiplus::Color OVERRIDE_EMER = Gdiplus::Color(255, 0, 0);

inline static bool startsWith(const char *pre, const char *str)
{
Expand Down

0 comments on commit 62f7ca2

Please sign in to comment.