Claus Hemberg Joergensen Posted July 11, 2019 at 10:40 PM Posted July 11, 2019 at 10:40 PM Hello. I have not been able to find information on, how my plugin can draw on for example the Standard ES Radar Screen, since it is not defined in my plugin. Right now I am drawing inside my overridden OnRefresh() in my custom CRadarScreen subcl[Mod - Happy Thoughts], but how can do the same for other radar screen's - or is it just not possible? Thank you for your help. Best regards Claus Hemberg Jørgensen Controller/Mentor, Vatsim Scandinavia Claus Hemberg Joergensen Vatsim Membership Manager - Americas Link to comment Share on other sites More sharing options...
Juha Holopainen Posted July 17, 2019 at 07:32 AM Posted July 17, 2019 at 07:32 AM Hi, in the EuroScope Plugins dialog, select your plugin and give it permission to draw on the desired screen types. That should do it. If that doesn’t work, it may be necessary to change your code to return a screen in OnRadarScreenCreated for all the desired screen names, not just the one registered in your plugin, but I don’t see why that would be necessary. If you just want to draw on a specific screen such as the default one, just skip registering a screen and return a screen in OnRadarScreenCreated when the created screen name matches any screen you want to draw on (and then allow your plugin to draw on them in the plugins dialog). Link to comment Share on other sites More sharing options...
Claus Hemberg Joergensen Posted July 17, 2019 at 08:24 AM Author Posted July 17, 2019 at 08:24 AM Hi, in the EuroScope Plugins dialog, select your plugin and give it permission to draw on the desired screen types. That should do it. If that doesn’t work, it may be necessary to change your code to return a screen in OnRadarScreenCreated for all the desired screen names, not just the one registered in your plugin, but I don’t see why that would be necessary. If you just want to draw on a specific screen such as the default one, just skip registering a screen and return a screen in OnRadarScreenCreated when the created screen name matches any screen you want to draw on (and then allow your plugin to draw on them in the plugins dialog). Ah, thanks a lot. I thought I would override the entire drawing of for example the standard screen, by returning my own radar screen instance, but from how I understand your response, this seems not to be the case. Claus Hemberg Joergensen Vatsim Membership Manager - Americas Link to comment Share on other sites More sharing options...
Juha Holopainen Posted July 17, 2019 at 11:57 AM Posted July 17, 2019 at 11:57 AM Yes, the simplest way to draw stuff is to: - Always return a screen in OnRadarScreenCreated regardless of the display type about to be created. The more I think about it, the plugin probably does need to return a screen for each display type you want it to be able to draw on (this should be easy to test). - Not register a custom display type. Registering a custom display type is useful pretty much only when you want to control what else in addition to your stuff gets drawn on the screen. Then just allow the plugin to draw on the desired display types in the plugins dialog. Link to comment Share on other sites More sharing options...
Claus Hemberg Joergensen Posted July 18, 2019 at 06:16 AM Author Posted July 18, 2019 at 06:16 AM Ok, I think I got it. Thank you very much for your thorough reply, Juha...appreciated! Claus Hemberg Joergensen Vatsim Membership Manager - Americas Link to comment Share on other sites More sharing options...
Recommended Posts