Skip to content

Commit f9028fa

Browse files
committed
update to 0.2.4.1; prelim freetext
1 parent 0005748 commit f9028fa

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

CSiTRadar.cpp

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ void CSiTRadar::OnRefresh(HDC hdc, int phase)
3535
}
3636

3737
RECT radarea = GetRadarArea();
38-
AddScreenObject(SCREEN_BACKGROUND, "", radarea, false, "");
3938

4039
// time based functions
4140
double time = ((double)clock() - (double)halfSec) / ((double)CLOCKS_PER_SEC);
@@ -567,14 +566,26 @@ void CSiTRadar::OnClickScreenObject(int ObjectType,
567566
altFilterOn = !altFilterOn;
568567
}
569568

570-
if (ObjectType == SCREEN_BACKGROUND) {
571-
if (Button == BUTTON_MIDDLE) {
572-
// open Free Text menu
569+
570+
571+
if (Button == BUTTON_MIDDLE) {
572+
// open Free Text menu
573573

574+
RECT freeTextPopUp;
575+
freeTextPopUp.left = Pt.x;
576+
freeTextPopUp.top = Pt.y;
577+
freeTextPopUp.right = Pt.x + 20;
578+
freeTextPopUp.bottom = Pt.y + 10;
579+
580+
GetPlugIn()->OpenPopupList(freeTextPopUp, "Free Text", 1);
581+
582+
GetPlugIn()->AddPopupListElement("ADD FREE TEXT", "", ADD_FREE_TEXT);
583+
GetPlugIn()->AddPopupListElement("DELETE", "", DELETE_FREE_TEXT, FALSE, POPUP_ELEMENT_NO_CHECKBOX, true, false);
584+
GetPlugIn()->AddPopupListElement("DELETE ALL", "", DELETE_ALL_FREE_TEXT);
574585

575-
}
576586
}
577587

588+
578589
}
579590

580591
void CSiTRadar::OnFunctionCall(int FunctionId,

SituPlugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
SituPlugin::SituPlugin()
77
: EuroScopePlugIn::CPlugIn(EuroScopePlugIn::COMPATIBILITY_CODE,
88
"NAVCANSitu",
9-
"0.2",
9+
"0.2.4.1",
1010
"Ron Yan",
1111
"Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)")
1212
{

constants.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ const int FUNCTION_ALT_FILT_SAVE = 303;
3131
// Radar Background
3232
const int SCREEN_BACKGROUND = 501;
3333

34+
const int ADD_FREE_TEXT = 1101;
35+
const int DELETE_FREE_TEXT = 1102;
36+
const int DELETE_ALL_FREE_TEXT = 1103;
37+
38+
3439
// Module 2 : distances relative to module origin
3540
const int HALO_TOOL_X = 0;
3641
const int HALO_TOOL_Y = 0;

0 commit comments

Comments
 (0)