Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

Plugin dev.: possible to draw on other radar views?


Claus Hemberg Joergensen
 Share

Recommended Posts

Claus Hemberg Joergensen
Posted
Posted

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

vatsim_250.png.cb6bb5fa2b0b19b9301c46c1dea85658.png

Link to comment
Share on other sites

Juha Holopainen
Posted
Posted

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

Claus Hemberg Joergensen
Posted
Posted
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

vatsim_250.png.cb6bb5fa2b0b19b9301c46c1dea85658.png

Link to comment
Share on other sites

Juha Holopainen
Posted
Posted

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

Claus Hemberg Joergensen
Posted
Posted

Ok, I think I got it.

Thank you very much for your thorough reply, Juha...appreciated!

Claus Hemberg Joergensen
Vatsim Membership Manager - Americas

vatsim_250.png.cb6bb5fa2b0b19b9301c46c1dea85658.png

Link to comment
Share on other sites

 Share