• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Closing the Main 2D Panel

Messages
1,084
Country
us-northcarolina
I have created the FO side of the feelthere CRJ FSX version their original software 2D panel. It works perfectly and appears when the icon is clicked. My problem is that the 2D Main panel still is in the background unless I right click and close window. Is there an xml command that I can add to the icon gauge code to automatically close that window. Then when I click the "Main Panel" Icon on the FO panel likewise I would like to close it automatically when the main panel is again called up. Help please.
 
Code:
(>K:PANEL_1)

will toggle the main panel but you don't know the status (whether open or closed) of the panel using XML. You can use PANEL_1 through to PANEL_9 commands.

You can try

Code:
1 (>K:PANEL_1)

to see if that will always open the panel or

Code:
0 (>K:PANEL_1)

to see if that always closes it.
 
This is what I use in my panel ,
Code:
<Gauge Name="Panel Icon" Version="1.0">
//for F-111 by Karol Chlebowski @2009**
   <Image Name="Icon_Panel.bmp" ImageSizes="59,19,30,30"/>
   <Mouse>
<Tooltip>Toggle Co-Pilot's Window</Tooltip>
<Cursor Type="Hand"/>
<Click>400 (>K:PANEL_ID_TOGGLE) 1 (>K:PANEL_ID_TOGGLE) (L:Viewpoint,bool) ! (>L:Viewpoint,bool)</Click>
   </Mouse>
//the 400 = ident in panel cfg **
</Gauge>

I have this toggle switch in both 2D cockpits .

Following is the Panel cfg sections that are relevant ,

PANEL CFG .

[Window Titles]
Window00=Main Panel //dummy
Window01=Pilot Panel

Window05=Co Pilot

//---Pilot Panel ---
[Window01]
file=F-111v2pnl.bmp
size_mm=1366,768 //1024,768
window_size_ratio=1.000
position=7
visible=1
ident=1
zorder=00
window_size= 1.000, 1.000
window_pos= 0.000, 0.000

gauge00= ......

//---Co Pilot Panel---
//--------------------------------------------------------
[Window05]
file=F-111v2pnlcp.bmp
size_mm=1366,768 //1024,768
window_size_ratio=1.000
position=7
visible=0
ident=400
zorder=00
window_size= 1.000, 1.000
window_pos= 0.000, 0.000

gauge00= ......

Notice both " ident = " and " zorder= " used above

1. In the above setup when in the LH 2D Pilot cockpit a click at the Panel Icon switches Off the LH 2D Pilot cockpit and switches On the RH 2D Co Pilot cockpit ,
2. a click on the Panel Icon while in the RH 2D Co Pilot cockpit switches it Off and switches the LH 2D Pilot cockpit On .

Cheers
Karol
 
thank you both for your quick replies. I am going to try both ways and see which works best in the CRJ. Will post results later. My wife is telling me its grocery store not FSD (LOL) now.
 
I've never noticed PANEL_ID_TOGGLE before.

Note that there are also PANEL_ID_OPEN and PANEL_ID_CLOSE commands which might be more robust than using PANEL_ID_TOGGLE as you might not know the status of panel when using a toggle which could cause you to close something when you really wanted it open.

Can I also point you both to this thread from a few days ago. Take particular note of the IDENT values. Cobs uses a panel IDENT of 400. Now, I am sure that doesn't cause any problems but as you can see from my post that user panel IDENTs have a reserved value range of 10000 to 19999 so I would recommend using a value within that range unless one of the pre existing IDENT codes fits your purposes (eg ident=THROTTLE_PANEL or ident=GPS_PANEL etc).

http://www.fsdeveloper.com/forum/threads/checking-if-a-2d-panel-is-open.435571/
 
Back
Top