Jump to content

Archived

This topic is now archived and is closed to further replies.

bliksimpie

Panel popups and view changes

Recommended Posts

Someone asked the question how to make the panel popup stay in FSX even when switching views. Unfortuanately I cannot find the post this morning.I add a line to panel entry as example below that contain line type=SPECIAL:[Window04]size_mm=1000,100position=0BACKGROUND_COLOR=0,0,0VISIBLE=1ident=10022type=SPECIALWith this line added the panel popup stay locked even if i change views.

Share this post


Link to post
Share on other sites
Someone asked the question how to make the panel popup stay in FSX even when switching views. Unfortuanately I cannot find the post this morning.I add a line to panel entry as example below that contain line type=SPECIAL:[Window04]size_mm=1000,100position=0BACKGROUND_COLOR=0,0,0VISIBLE=1ident=10022type=SPECIALWith this line added the panel popup stay locked even if i change views.
Great tip - It also works in FS2004 too.Thanks for sharing! EDIT Added:I thought so much of the tip that I posted it in the Tips and Tricks forum also - hope you don't mind.

Share this post


Link to post
Share on other sites
Great tip - It also works in FS2004 too.Thanks for sharing! EDIT Added:I thought so much of the tip that I posted it in the Tips and Tricks forum also - hope you don't mind.
not a problem.. stumbled onto this one a while ago..I for one searched very long to get this right, so I am sure there are other that also would like this tip.

Share this post


Link to post
Share on other sites

Hello fellows,Great tip -From what I understand, you are to add this "window" as an "additional" window entry to you panel.cfg?Example: C172 - has 5 window entries already. I "add" this new window as 6 -I make an entry in the top of config under windows - AS - Window 6=Special?Am I correct?Thanks so very much.cthiggin

Share this post


Link to post
Share on other sites
Hello fellows,Great tip -From what I understand, you are to add this "window" as an "additional" window entry to you panel.cfg?Example: C172 - has 5 window entries already. I "add" this new window as 6 -I make an entry in the top of config under windows - AS - Window 6=Special?Am I correct?Thanks so very much.cthiggin
No, you just add the line to any existing entries you wish to work that way - example:[Window05] //Digital Compass optionsize_mm=101,103background_color=0,0,0position=2visible=0ident=COMPASS_PANELtype=special gauge00=mag_compass!compass_popup_A,6,6,95,97In this example I am using a replacement compass which has a digital display added.http://library.avsim...gau&DLID=154834Hope that helps clarify the useage,

Share this post


Link to post
Share on other sites

That must be a holdover from a very distant ancestor, as there is nothing documented for this entry in any SDK from FS98 onward... :( Makes me wonder what would have led anyone into "guessing" that it would work? :(

Share this post


Link to post
Share on other sites
That must be a holdover from a very distant ancestor, as there is nothing documented for this entry in any SDK from FS98 onward... :( Makes me wonder what would have led anyone into "guessing" that it would work? :(
You are right sir. I have read everything in the SDK documentation and believe me when I say I went through it with a fine comb, and could not find anything on this subject. It drove me completely nuts to have popup panels dissapear when switching views.. Been searching this thing for more then 2 years..Well at least now it work and I think there will be a number of people who would enjoy this ability to have a popups "stuck"Unfortunately I cannot give credit to who figured it out as I really cannot remember where I saw this line in a panel.cfg file the first time. I once saw a panel stay stuck, when switching views, and on further investigation I found this entry. As this has been found a couple of months ago already, and all my planes have this line added somewhere in the mean time, it is just impossible to now go back and say it was here or here that I saw it first. I never thought much about this otherwise I would have shared it long ago.Saw post of someone asking for this, and maybe it was not even on this site, but I could not find the post this morning so I thought I will just post answer and hope the guy see it who asked for this.Well I must say I have had a good time with it last couple of months. :(

Share this post


Link to post
Share on other sites

Hi,From the fs9 SDK, window section:type = Specifies the type of the panel window. Valid entries are PANEL for aircraft panels, MINIPANEL for gauge windows shown in the “minipanel” mode, or SPECIAL for pseudo panel windows.Jan

Share this post


Link to post
Share on other sites

This information is much appreciated! Thanks!I wonder, is there anything along these lines that can cause a popup window, or 'psuedo panel window', as it were, to open itself when the aircraft is first loaded? :)decessus est bliss

Share this post


Link to post
Share on other sites
This information is much appreciated! Thanks!I wonder, is there anything along these lines that can cause a popup window, or 'psuedo panel window', as it were, to open itself when the aircraft is first loaded? :)decessus est bliss
Try this:In each "window" in the panel.cfg file there should be a line which says - visible=0Change it to read visible=1 (1 meaning yes - 0 (zero) meaning no)The window in question should then be visible when you load the aircraft.Hope that is what you were referring to.

Share this post


Link to post
Share on other sites
Try this:In each "window" in the panel.cfg file there should be a line which says - visible=0Change it to read visible=1 (1 meaning yes - 0 (zero) meaning no)The window in question should then be visible when you load the aircraft.Hope that is what you were referring to.
Hi Opa,Yes, that is what I wanted to achieve, but my experimenting with visible= today has shown me that it doesn't seem to do anything at all no matter which way it is set. I read on some post somewhere that the visible= command was meant only for the "Main_Panel" window, and I never use 2D, so that might be why it isn't working for me. The windows I would like to have open are the kind I access by pressing, for example, Shift+5, and are thus overlaid on either the virtual cockpit or external view. I don't like the 2D panels for several reasons.

Share this post


Link to post
Share on other sites

Unfortunately, visible=1 only works if you load the a/c to the 2d panel.If you want the subpanel to open automatically, simply script a tiny, invisible XML gauge to open it, and place a copy in both the [VCockpit01] section and the [Window00] section of the panel.cfg file.

<Gauge Name="AutoOpen" Version="1.0">  <Image Name="Transparent.bmp" />  <Update Hidden="Yes">    (L:Init,bool) 0 ==    if{      10040 (>K:PANEL_ID_TOGGLE)      1 (>L:Init,bool)    }  </Update></Gauge>

Transparent.bmp is simply a tiny 64x64 pixel bitmap with pure black (0,0,0) for the color.Substitute whatever number you've chosen for the ident= in the panel.cfg file.

Share this post


Link to post
Share on other sites
Unfortunately, visible=1 only works if you load the a/c to the 2d panel.If you want the subpanel to open automatically, simply script a tiny, invisible XML gauge to open it, and place a copy in both the [VCockpit01] section and the [Window00] section of the panel.cfg file.
<Gauge Name="AutoOpen" Version="1.0">  <Image Name="Transparent.bmp" />  <Update Hidden="Yes">    (L:Init,bool) 0 ==    if{      10040 (>K:PANEL_ID_TOGGLE)      1 (>L:Init,bool)    }  </Update></Gauge>

Transparent.bmp is simply a tiny 64x64 pixel bitmap with pure black (0,0,0) for the color.Substitute whatever number you've chosen for the ident= in the panel.cfg file.

This looks like something I can do, but I have never made a gauge before. Can I simply put this code you wrote INTO the panel.cfg file in those 2 places? I have edited a lot of panel.cfg files, but never seen such code before, so I want to make sure I know what to do. You said substitute the ident=, but I don't see "ident=" in your code, so where would I put the substituted number from the panel.cfg's ident= statement in the gauge window? Do I just add that into your code?

Share this post


Link to post
Share on other sites
This looks like something I can do, but I have never made a gauge before. Can I simply put this code you wrote INTO the panel.cfg file in those 2 places? I have edited a lot of panel.cfg files, but never seen such code before, so I want to make sure I know what to do. You said substitute the ident=, but I don't see "ident=" in your code, so where would I put the substituted number from the panel.cfg's ident= statement in the gauge window? Do I just add that into your code?
What I posted is XML gauge script. This .xml file along with the bitmap should be in a subfolder of the ..\panel folder. Give the new subfolder some unique name, such as "MyGauges" for example...\panel\MyGauges...........\AutoOpen.xml...........\Transparent.bmpThe panel.cfg entry would be:gaugenn=Mygauges!AutoOpen, 0,0,1,1Whatever ident= number you use in the panel.cfg for the new popup window you want "auto opened" is placed in the .xml script as the number immediately before the (>K:PANEL_ID_TOGGLE)command:10040 (>K:PANEL_ID_TOGGLE)

Share this post


Link to post
Share on other sites
What I posted is XML gauge script. This .xml file along with the bitmap should be in a subfolder of the ..\panel folder. Give the new subfolder some unique name, such as "MyGauges" for example...\panel\MyGauges...........\AutoOpen.xml...........\Transparent.bmpThe panel.cfg entry would be:gaugenn=Mygauges!AutoOpen, 0,0,1,1Whatever ident= number you use in the panel.cfg for the new popup window you want "auto opened" is placed in the .xml script as the number immediately before the (>K:PANEL_ID_TOGGLE)command:10040 (>K:PANEL_ID_TOGGLE)
It works!! :( Thank you so much!!One more question. Is it possible to concurrently open more than one window with this script, perhaps by adding another line such as :10020 (>K:PANEL_ID_TOGGLE)Below the one above, or would I need to do something else? Just curious. I really appreciate this! There is so much one can do to customize FSX it staggers the mind. But without good folks like yourself to guide the way, those of us wanting to modify it would not have nearly as much success. THANKS!!Zoandar

Share this post


Link to post
Share on other sites

I did try several variations just for fun. But I cannot make more than one window auto-open. I can get one, or the other (a second window) but never both together. So can you show me how it is done?

Share this post


Link to post
Share on other sites
I did try several variations just for fun. But I cannot make more than one window auto-open. I can get one, or the other (a second window) but never both together. So can you show me how it is done?
Is there no "edit" button for these posts?? ( I finally see one in THIS post ONLY, but not in any of my posts above??)I have tried many variations on trying to include reference to 2 different windows within the same XML code. I have tried using 2 different XML code files in the same panel subfolder. I have tried using separate panel subfolders for opening the two different windows. I have tried placing the "gaugenn=...." lines in 2 of the several different [Vcockpitxx] windows within the panel.cfg file for the aircraft I am using during testing. It always comes out the same way. Either it doesn't work at all, or else when it does work I get ONE window to auto-open. Usually the first one, numbered 10040. If I remark out the "gauge=nn......" listing for the first window, being ident=10040, then the second window, being ident=90 WILL open! So I can open "either", but never "both". I don't know what to do so I will stop the attempt to do multiple windows until someone can show me exactly how to do it. Clearly there is some piece of information I need that I don't have. BTW, in all the testing I did it doesn't seem to matter one way or the other whether I put the gaugenn=..... listing in [Window00] or not. But it does need to be in [Vcockpit01].

Share this post


Link to post
Share on other sites
One more question. Is it possible to concurrently open more than one window with this script, perhaps by adding another line such as :10020 (>K:PANEL_ID_TOGGLE)
<Gauge Name="AutoOpen" Version="1.0">   <Image Name="Transparent.bmp" />   <Update Hidden="Yes">     (L:Init,bool) 0 ==     if{       10020 (>K:PANEL_ID_TOGGLE)       10030 (>K:PANEL_ID_TOGGLE)      10040 (>K:PANEL_ID_TOGGLE)      1 (>L:Init,bool)     }   </Update> </Gauge>

Make sure that you edit each of the subpanels to appear in a different place on the screen, otherwise they will simply stack up on top of each other!

Share this post


Link to post
Share on other sites
<Gauge Name="AutoOpen" Version="1.0">   <Image Name="Transparent.bmp" />   <Update Hidden="Yes">     (L:Init,bool) 0 ==     if{       10020 (>K:PANEL_ID_TOGGLE)       10030 (>K:PANEL_ID_TOGGLE)      10040 (>K:PANEL_ID_TOGGLE)      1 (>L:Init,bool)     }   </Update> </Gauge>

Make sure that you edit each of the subpanels to appear in a different place on the screen, otherwise they will simply stack up on top of each other!

Well, I could swear I had tried this somewhere in all my various attempts, but it definitely does work! :-) Come to think of it, I'll bet I repeated some other part of the code in the overall "IF" statement when I shouldn't have. I know a little about programming in other languages like C (from playing with an Arduino board), but I have never used XML before. I did do a bit of searching online and found some XML tutorials that look interesting, so I may look a little deeper into it. When I first started using FS Panel Studio for FSX, I was immediately disappointed in how much I could 'not' do because of the number of aircraft panels using XML. I went on to find a statement somewhere online that said "Microsoft has provided very little information about the use of XML in gauge panels" before they shut down the whole flight sim division, so I thought I was pretty much out in the cold. But If XML can be used to do neat tricks like you just showed me, it is worth looking into. Some of the free aftermarket aircraft panels leave much to be desired. My solution to make them usable has been to provide my own popup windows with gauges I like and/or can read well enough to fly (one example is the tiny gauges on the EH101 provided by FSX Acceleration - Those need to be a lot bigger). Thanks again for all the help! Zoandar

Share this post


Link to post
Share on other sites
Thanks again for all the help!
No problem. The most difficult part for newbies to wrap their brains around is that XML uses "Reverse Polish Notation" for everything. If one grew up using the ancient and venerable HP calculators, RPN would be second nature.Just as an example, the general format for what in most any other real progamming language would be in the form:if (this condition) then (do something) else (do some other thing)takes the generic form in XML script:( this condition ) if{ do something } els{ do some other thing }In the XML script I provided earlier, the (condition) is (L:Init,bool) 0 ==. Because all L:variables are zero by default when the aircraft is first loaded, the actions listed following the if{ statement are executed.The last statement is 1 (>L:Init,bool) which sets the L:variable to one, which of course means that the control statements will never be run again until the aircraft is reloaded.Some fairly easy to follow tutorials are available here:http://www.fs2x.com/Tutorials.htmMore help is of course available here at AVSIM, but some additional help is available at FS-Developer:http://www.fsdeveloper.com/forum/forumdisplay.php?f=64

Share this post


Link to post
Share on other sites
No problem. The most difficult part for newbies to wrap their brains around is that XML uses "Reverse Polish Notation" for everything. If one grew up using the ancient and venerable HP calculators, RPN would be second nature.Just as an example, the general format for what in most any other real progamming language would be in the form:if (this condition) then (do something) else (do some other thing)takes the generic form in XML script:( this condition ) if{ do something } els{ do some other thing }In the XML script I provided earlier, the (condition) is (L:Init,bool) 0 ==. Because all L:variables are zero by default when the aircraft is first loaded, the actions listed following the if{ statement are executed.The last statement is 1 (>L:Init,bool) which sets the L:variable to one, which of course means that the control statements will never be run again until the aircraft is reloaded.Some fairly easy to follow tutorials are available here:http://www.fs2x.com/Tutorials.htmMore help is of course available here at AVSIM, but some additional help is available at FS-Developer:http://www.fsdevelop...isplay.php?f=64
Thanks for this information. That does help make sense out of what seemed like cryptic statements in the code. I have encountered the term RPN before, but I have always tried to stay away from it as much as possible. Yet, I do remember way back when early calculators worked that way. Very confusing to get used to. I am really surprised that XML was set up this way. Everything I have read online about XML so far has made mention of the underlying concept that it is supposed to be "easily understood" just by looking at it (to put it in my own words). So why they did RPN is a mystery to me, when so many other languages do the operations as IF/THEN/ELSE. I did read one person's opinion that the "greater than" symbol "should always be replaced" by, was it "gt;" or something like that? Even still, the statement 1 (>L:Init,bool) does leave me scratching my head. L:init.bool == 1 would make more sense to me. :) But as I said I don't know much about XML yet. So does (L:Init,bool) 0 == mean that variable "L" is being initialized to Boolean 0? Maybe if I pretend I am talking with Yoda it might help. :-) "Equal to Boolean zero, it is". I have run into one helicopter download with which I can not make this auto-open script work. I have successfully applied it to 22 other models I use, and am preparing to start adding it to the fixed wing planes in my collection. But I did everything exactly the same way on this one and the windows do not open. I can open them with the SHIFT+ keys, so I know I have the panel.cfg windows set up correctly. I can only guess that something within the code of the model itself is working against this XML script and not letting it work. Since I have the other 22 helos to fly I am not going to worry about it, and have deleted the model from my setup. But if you are curious, I can send you the files ( I have the original ZIP download) for it to see if you can find the problem. It is an S-70B-6 Aegean Hawk. It flies OK and I don't have any problems manually adding or operating windows listed in the panel.cfg file. So I have no idea what the issue is.

Share this post


Link to post
Share on other sites
I did read one person's opinion that the "greater than" symbol "should always be replaced" by, was it "gt;" or something like that? Even still, the statement 1 (>L:Init,bool) does leave me scratching my head. L:init.bool == 1 would make more sense to me. :) But as I said I don't know much about XML yet. So does (L:Init,bool) 0 == mean that variable "L" is being initialized to Boolean 0? Maybe if I pretend I am talking with Yoda it might help. :-) "Equal to Boolean zero, it is".
XML isn't technically a "programming language" at all; it is a "script" that is parsed by the XML engine, and translated internally into a "dynamic link library" in one form or another. XML is also "stack based" which is why it uses RPN for its structure.The expression formed by (L:Init,bool) 0 == is a "binary conditional test" that when evaluated will result in either TRUE or FALSE (1 or 0). Translated into pseudo-code it takes the form:if (L:Init,bool) = 0, then (return TRUE) else (return FALSE).
 if ( (L:Init , bool) == 0 )  {	 dosomething  } else  {	 dosomethingelse  } 

The example shown in the "code box" above is the output of a nifty tool in the FSX SDK named Infix2Postfix.exe. It will "translate" XML into a more familiar form of pseudo-code that sort of resembles C if an XML script is supplied, or the reverse if a C type expression is entered.Generally speaking, the symbols < and > should NOT be used, but instead the "escaped versions" < and > should be used...However, in the singular case of assigning a value to an L:variable or K:command, I use the convention n (>L:Variable,unit) and (>K:Event), because it works and is also quite distinctive. I call it the "stuffit" symbol, because that is essentially just what it does......it "stuffs" the preceding numeric value "into" the L:var or K:Event. Technically it places the numeric value on top of the expression's stack, but that's too much technical twaddle, IMHO. :( To be honest, I've far too much work to get done to get involved in anything else at the moment, but I'm available to answer questions most of the time. ;)

Share this post


Link to post
Share on other sites

×
×
  • Create New...