Skip to content

Commit e3a305f

Browse files
committed
magenta primary targets added; altitude filter defaults to on
1 parent ec02e25 commit e3a305f

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

CSiTRadar.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,29 @@ void CSiTRadar::OnRefresh(HDC hdc, int phase)
116116
DeleteObject(targetPen);
117117
}
118118

119+
// if primary target draw the symbol in magenta
120+
121+
if (radarTarget.GetPosition().GetRadarFlags() == 1) {
122+
COLORREF targetPenColor;
123+
targetPenColor = RGB(197, 38, 212); // magenta colour
124+
HPEN targetPen;
125+
targetPen = CreatePen(PS_SOLID, 1, targetPenColor);
126+
dc.SelectObject(targetPen);
127+
dc.SelectStockObject(NULL_BRUSH);
128+
129+
// draw the shape
130+
dc.MoveTo(p.x, p.y + 4);
131+
dc.LineTo(p.x, p.y);
132+
dc.LineTo(p.x - 4, p.y - 4);
133+
dc.MoveTo(p.x, p.y);
134+
dc.LineTo(p.x + 4, p.y - 4);
135+
136+
// cleanup
137+
DeleteObject(targetPen);
138+
139+
}
140+
141+
119142
// if VFR
120143
if (strcmp(radarTarget.GetCorrelatedFlightPlan().GetFlightPlanData().GetPlanType(), "V") == 0
121144
&& radarTarget.GetPosition().GetTransponderC() == TRUE

CSiTRadar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class CSiTRadar :
9393
bool halotool = FALSE;
9494
bool mousehalo = FALSE;
9595
bool altFilterOpts = FALSE;
96-
bool altFilterOn = FALSE;
96+
bool altFilterOn = TRUE;
9797

9898
bool pressed = FALSE;
9999
int haloidx = 1; // default halo radius = 3, corresponds to index of the halooptions

0 commit comments

Comments
 (0)