How to create Custom Menu in Scaleform.

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
tauseefAhmed
Posts: 38
Joined: Wed Jul 31, 2019 4:56 pm

How to create Custom Menu in Scaleform.

Post by tauseefAhmed »

A friendly hello to all.
For past few days I've been trying to create custom menu in P3d. The purpose of this menu is to feed the information for Targeting Pod i.e. Sensor selection, Geo Referencing based on Lat Long entered using the menu and so on.
I'm a little bit familiar with Action Script and Adobe Animate as I worked on redesigning the default targetingPodView as per my own requirements.
I know how would I send data i.e Lat long info to the targetingPod plugin.
But how to create a menu along with sub menus is a problem I'm unable to figure out.
There are samples in
Lockheed Martin\Prepar3D v4 SDK 4.5.12.30293\Panels and User Interface\Scaleform\ui folder named as ApplicationMenu and MenuWindow.
But I'm unable to figure out how to get them working, as they appear to be plain whitepages when I publish them as swf movie files. Although there are script files as well but there are no actual menu Items available (apparently) which might be using those sccripts.

Can anyone help me out how to utilize these samples (if possible) or create a new menu in ScaleForm?


Any help would be much appreciated.

Thank you very much.
Cesar Vejar
Posts: 5
Joined: Tue Dec 17, 2019 2:40 am

Re: How to create Custom Menu in Scaleform.

Post by Cesar Vejar »

Along with greeting, I want to know if you managed to place the camera with the TargetingPod.swf?

I want to place the targeting pod as a gaugue or as a window.

I have an A-10 Warthog that I am modifying and I managed to create an MDF from the F-16, but I cannot activate the camera of the targeting pod. I would like my A-10 to have this camera active either inside the VC or as a floating gaugue or floating window.

I hope you can help me.

greetings from Chile.
tauseefAhmed
Posts: 38
Joined: Wed Jul 31, 2019 4:56 pm

Re: How to create Custom Menu in Scaleform.

Post by tauseefAhmed »

Yes I have done it already.
For that, you need to create a window in panel.cfg
And in that window, you need to add two entries.
1: SCALEFORM_RTT_ELEMENT this would be the scaleform panel you want to add as panel window.
2: SCALEFORM_RTT_ELEMENT_00. This would be the title of your TargetingPod camera. i.e TargetingPodView

You may refer to the scaleform information provided in the documentation.
It will help you in creating scaleform panels.

Also, there's an MFD sample provided in SDK/Panels and User Interface / Scaleform Panels / Samples /Multi Function Display directory.

Add window definitions in Panel.cfg of the aircraft.

Window14=MFD_Window

[Window14]
window_size = 4.5,4.5 //change this size as per your requirements
position = 5
background_color = 0, 0, 0
alpha_blend = 0.00
visible = 1
zorder = 100
ident = 1000
SCALEFORM_RTT_ELEMENT = MultifunctionDisplay2D.swf
SCALEFORM_RTT_ELEMENT_00 = TargetingPodView


Regards
Tauseef
Post Reply