Bedrich Schindler Posted October 3, 2015 at 02:30 PM Posted October 3, 2015 at 02:30 PM Hello, I have programmed two EuroScope plugins for VACC-CZ, but I having troubles with tag item coloring. I know, how to change color of tag item which is registered in my plugin: const int TAG_ITEM_EXT_VERTICAL_SPEED_IDENTIFICATOR = 1; CExtendedTAGS::CExtendedTAGS() : EuroScopePlugIn::CPlugIn ( EuroScopePlugIn::COMPATIBILITY_CODE, MY_PLUGIN_NAME, MY_PLUGIN_VERSION, MY_PLUGIN_DEVELOPER, MY_PLUGIN_COPYRIGHT ) { RegisterTagItemType("Extended Vertical Speed Identificator", TAG_ITEM_EXT_VERTICAL_SPEED_IDENTIFICATOR); } void CExtendedTAGS::OnGetTagItem(EuroScopePlugIn::CFlightPlan FlightPlan, EuroScopePlugIn::CRadarTarget RadarTarget, int ItemCode, int TagData, char sItemString[16], int * pColorCode, COLORREF * pRGB, double * pFontSize) { switch (ItemCode) { case TAG_ITEM_EXT_VERTICAL_SPEED_IDENTIFICATOR: *pColorCode = EuroScopePlugIn::TAG_COLOR_RGB_DEFINED; *pRGB = RGB(255, 255, 0); if (RadarTarget.GetVerticalSpeed() < -99) { strcpy(sItemString, "|"); // VSI - Arrow up break; } if (RadarTarget.GetVerticalSpeed() >= -99 && RadarTarget.GetVerticalSpeed() <= 99) { strcpy(sItemString, "="); // VSI - Equals break; } if (RadarTarget.GetVerticalSpeed() > 99) { strcpy(sItemString, "^"); // VSI - Arrow down break; } break; } } But I want to change color of all text in tag, because I want to simulate behavior of real EC2000 - blinking all text in tag on handoff. But if I write code for color change right inside OnGetTagItem, it changes colors only of tag items which are registered in my plugin: const int TAG_ITEM_EXT_VERTICAL_SPEED_IDENTIFICATOR = 1; const int TAG_ITEM_EXT_GROUND_SPEED = 2; const int TAG_ITEM_NON_RVSM_INDICATOR = 3; const int TAG_ITEM_CALLSIGN_SQUAWK = 4; const int TAG_ITEM_EXT_SECTOR_ENTRY_AND_TEMPORARY_ALTITUDE = 5; const int TAG_ITEM_AIRCRAFT_TYPE_AND_CATEGORY = 6; const int TAG_ITEM_NEXT_FREQUENCY = 7; CExtendedTAGS::CExtendedTAGS() : EuroScopePlugIn::CPlugIn ( EuroScopePlugIn::COMPATIBILITY_CODE, MY_PLUGIN_NAME, MY_PLUGIN_VERSION, MY_PLUGIN_DEVELOPER, MY_PLUGIN_COPYRIGHT ) { RegisterTagItemType("Extended Vertical Speed Identificator", TAG_ITEM_EXT_VERTICAL_SPEED_IDENTIFICATOR); RegisterTagItemType("Extended Ground Speed", TAG_ITEM_EXT_GROUND_SPEED); RegisterTagItemType("Extended Non-RVSM Indicator", TAG_ITEM_NON_RVSM_INDICATOR); RegisterTagItemType("Extended Callsign/Squawk", TAG_ITEM_CALLSIGN_SQUAWK); RegisterTagItemType("Extended Sector Entry and Temporary Altitude", TAG_ITEM_EXT_SECTOR_ENTRY_AND_TEMPORARY_ALTITUDE); RegisterTagItemType("Extended Aircraft Type and Category", TAG_ITEM_AIRCRAFT_TYPE_AND_CATEGORY); RegisterTagItemType("Extended Next Frequency", TAG_ITEM_NEXT_FREQUENCY); } void CExtendedTAGS::OnGetTagItem(EuroScopePlugIn::CFlightPlan FlightPlan, EuroScopePlugIn::CRadarTarget RadarTarget, int ItemCode, int TagData, char sItemString[16], int * pColorCode, COLORREF * pRGB, double * pFontSize) { *pColorCode = EuroScopePlugIn::TAG_COLOR_RGB_DEFINED; *pRGB = RGB(255, 255, 0); // ... 360 is colored by code bellow } I know that it might be caused because CExtendedTAGS cl[Mod - Happy Thoughts] is inherited from EuroScopePlugIn::CPlugIn, nevertheless I don't know ho to implement it correctly - I'm web programmer and I have done several application in C# (and other languages), but in C++ I have done only two "simple" plugins. Thanks for understanding and help. Bedřich Schindler IT Director VACC-CZ Link to comment Share on other sites More sharing options...
Bedrich Schindler Posted October 4, 2015 at 05:33 PM Author Posted October 4, 2015 at 05:33 PM Any idea? Bedřich Schindler IT Director VACC-CZ Link to comment Share on other sites More sharing options...
Pierre Ferran Posted October 4, 2015 at 05:59 PM Posted October 4, 2015 at 05:59 PM From what I understand, only the colors of the tag items from your plugin are changing, which is how it is supposed to be. You can't change EuroScope's default tag items from a plugin, you have to recreate them yourself. vSMR Plugin for EuroScope Link to comment Share on other sites More sharing options...
Recommended Posts