Jump to content
Sign in to follow this  
Maverick283

Selfmade Pop up view only lasts for the split of a second

Recommended Posts

Hello everybody, I have not found anything but one post about this problem on the internet, unfortunately this post didnt resolve the problem, so I am hoping to get some help here, it would be very appreciated!

So i created (or rather tried to create^^) a own little pop up window giving me RPMs, Speed, Altitude and a switch to enable smoke. I created the background pictures with Photoshop, then copy pasted a lot from other FSX Aircrafts, replaced with names and so on so that it should be working, BUT:

Whenever I try to open that window (by pressing SHIFT+1) I can see the window of it coming up where it is supposed to be but then within the next frame my FSX creates it is disappeared. This only works once, then it will not do it again.

Any Ideas?

Thanks in advance... If you need any codes to help me out better, please just ask, I didnt want to overflow this.

Share this post


Link to post
Share on other sites

Can you at least post the panel.cfg entry for it?

 

regards,

Joe


The best gift you can give your children is your time.

sigbar.gif

Share this post


Link to post
Share on other sites

Shift+1 may not be the best key combination to bring up your window.  Try a different one.

 

Hook


Larry Hookins

 

Oh! I have slipped the surly bonds of Earth
And danced the skies on laughter-silvered wings;

Share this post


Link to post
Share on other sites

There is an error in your code.

 

No one knows what the error is but make no mistake there is an error as FSX will always do this when there is an error. It opens the 2D screen, realises there is an error and then shuts it again. If I had a dollar for each time I had seen that popup flash I would be rather well off financially.

 

It is best, when working with these sorts of things, to do things one step at a time.

 

You shouldn't add a whole bunch of gauges all together but instead try just one. Only when you have that one gauge working do your continue adding others.

 

Posting the code here would indeed be a good way to start.


www.antsairplanes.com

Share this post


Link to post
Share on other sites

Alright thanks for the responses, here is the code:

Panel.cfg:

 

 
 
[Window Titles]
Window00=Smoke and simplePFD
 
[Window00]
size_mm=400,284
position=0
visible=0
ident=Smoke and simplePFD
window_size= 0.250
//window_pos= 0.000, 0.000
sizeable = 0
 
gauge00=ADD!smoke , 0,0,400,284
 
 
 
smoke.cfg:
 
<SimBase.Document Type="AceXML" version="1,0">
    <Descr>AceXML Document</Descr>
    <Filename>smoke.xml</Filename>
    <SimGauge.Gauge id="smoke" ArtDirectory=".">
        <FloatPosition>0.000,0.000</FloatPosition>
        <Size>400,284</Size>
        <Image id="Image" Name="add_background.bmp">
            <Transparent>True</Transparent>
        </Image>
 
 
 
 
 
<Element id="RPM Readout">
             <FloatPosition>126.000,118.000</FloatPosition>
             <Visibility>(L:RPM Mode, number) 0 ==</Visibility>
             <GaugeText id="RPM Readout">
                 <Bright>True</Bright>
                 <FontFace>Quartz</FontFace>
                 <FontColor>0x080808</FontColor>
                 <FontHeight>20</FontHeight>
                 <GaugeString>%((A:PROP1 RPM, rpm))%!4d!
                 </GaugeString>
                 <HorizontalAlign>CENTER</HorizontalAlign>
                 <Size>142,44</Size>
                 <Transparent>True</Transparent>
             </GaugeText>
</Element>
 
 
<Element id="Speed Readout">
             <FloatPosition>126.000,33.000</FloatPosition>
             <Visibility>0</Visibility>
             <GaugeText id="Speed Readout">
                 <Bright>True</Bright>
                 <FontFace>Quartz</FontFace>
                 <FontColor>0x080808</FontColor>
                 <FontHeight>20</FontHeight>
                 <GaugeString>%((A:Airspeed indicated, knots))%!03d!
                 </GaugeString>
                 <HorizontalAlign>CENTER</HorizontalAlign>
                 <Size>142,44</Size>
                 <Transparent>True</Transparent>
             </GaugeText>
</Element>
 
 
 
 
<Element id="Altitude Readout">
             <FloatPosition>126.000,203.000</FloatPosition>
             <Visibility>0</Visibility>
             <GaugeText id="Altitude Readout">
                 <Bright>True</Bright>
                 <FontFace>Quartz</FontFace>
                 <FontColor>0x080808</FontColor>
                 <FontHeight>20</FontHeight>
                 <GaugeString>%((A:Indicated Altitude, feet))%!05d!
                 </GaugeString>
                 <HorizontalAlign>CENTER</HorizontalAlign>
                 <Size>142,44</Size>
                 <Transparent>True</Transparent>
             </GaugeText>
</Element>
 
 
<Element id="Smoke">
            <FloatPosition>288.000,78.000</FloatPosition>
            <Select id="Select">
                <Expression id="Expression">
                    <Minimum>0.000</Minimum>
                    <Maximum>1.000</Maximum>
                    <Script>(A:Smoke Enable, bool)</Script>
                </Expression>
                <Case id="Case">
                    <ExpressionResult>0.000</ExpressionResult>
<Image id="Image" Name="switch_panel_switch_show_smoke_off.bmp">
<Transparent>True</Transparent>
</Image>
                </Case>
                <Case id="Case">
                    <ExpressionResult>1.000</ExpressionResult>
<Image id="Image" Name="switch_panel_switch_show_smoke_on.bmp">
<Transparent>True</Transparent>
</Image>
                </Case>
            </Select>
        </Element>
 
 
 
 
<MouseArea id="Smoke">
                <FloatPosition>350.000,144.000</FloatPosition>
                <Size>132,88</Size>
                <CursorType>Hand</CursorType>
                <MouseClick id="MouseClick">
                    <KeyEvent>SMOKE_TOGGLE</KeyEvent>
                    <ClickType>LeftSingle</ClickType>
                </MouseClick>
                <Tooltip id="Tooltip">
                    <DefaultId>HELPID_EXTR_SMOKE</DefaultId>
                </Tooltip>
            </MouseArea>

 

 

 

The Smoke.cfg is in the folder "ADD" which is in the same directory as the panel.cfg, so that reference should be fine. The "ADD" folder also includes the three pictures that are being referenced by the smoke.cfg, all with the names stated in the cfg. I will try to just take parts out and start of with the very basic tomorrow, and see if i can find a mistake that way, but i do kind of have the feeling that when i strip everything off it will still have an error. Any help would still be more then appreciated! :D Thanks in advance.


Ouh and sorry if some stuff seems messy or not thought through, i am not really into that whole stuff yet though i have red a couple pages about the whole gauge designing. excuse my begginner mistakes please, thanks!: D

Share this post


Link to post
Share on other sites

[uPDATE!!!]
By the method of excluding things (thanks to anthonys tipp) I have found a mistake in my code (already corrected it in the post).

Now the window actually stays there, but it remains black. Any more Ideas? Does the .bmp need special properties? do i have to pay attention to anything when i do them?


Alright and after overlooking for about the 100th time, i have found my error. I was missing the 

 
    </SimGauge.Gauge>
</SimBase.Document>
 
at the bottom of the smoke.xml.

Summing up this topic so i can mark this post as the one solving it:
If guages disappear, it may be due to a not excisting file that FSX is trying to access.
If they stay black, make sure you got ALL the fromality filled in the .cfg fiels.

Thanks for everyones endeavour!
 
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...