Jump to content

Archived

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

lzamm

XML gauge overlay

Recommended Posts

I am trying to overlay one xml gauge over another (actually an spb) for a mod I am working on, however I could not get my gauge to appear over the old one.  On further experimentation it appears that a visible customdraw - and not just fs9gps - forces the gauge to be drawn last, ie. over anything else in that patch, irrespective of order in the panel.cfg and draworder statements.

 

Anyone else seen this and/or has a workaround?  Or am I doing something wrong?

Share this post


Link to post
Share on other sites

Is this something for your own personal use only? If so, you could decompile the ShapePropBinary (.spb) file and then insert your additions into the existing 'raw' XML script.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556

Interests: Gauge Programming - 3d Modeling for Milviz

Many Thanks to All That Donated To Our Server Drive!

Share this post


Link to post
Share on other sites

Thanks for your reply Bill.

 

That's exactly what I'm trying to avoid :)  So, no other way?

Share this post


Link to post
Share on other sites

None that I'm aware of, no.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556

Interests: Gauge Programming - 3d Modeling for Milviz

Many Thanks to All That Donated To Our Server Drive!

Share this post


Link to post
Share on other sites

Found a solution, obvious in retrospect (aren't they all?)

 

Put a customdraw in the overlaying gauge.  Even a size of 0x0 works!

Share this post


Link to post
Share on other sites

Found a solution, obvious in retrospect (aren't they all?)

 

Put a customdraw in the overlaying gauge.  Even a size of 0x0 works!

Well I'll be! Now we both have learned something new. I'll have the answer handy the next time the subject is brought up. :Applause:


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556

Interests: Gauge Programming - 3d Modeling for Milviz

Many Thanks to All That Donated To Our Server Drive!

Share this post


Link to post
Share on other sites

Found a solution, obvious in retrospect (aren't they all?)

 

Put a customdraw in the overlaying gauge.  Even a size of 0x0 works!

 

Very interesting !

 

Any further details on the above method would be greatly appreciated .

 

Is this a matter of placing 2 gauges at the same x,y location in the panel cfg ?

 

How do you determine which gauge appears on top ?

 

Cheers

Karol

Share this post


Link to post
Share on other sites

Yes.  Generally the order is determined by the order in the panel.cfg but FSX sometimes takes things into its own hands, however you can use the draworder statement to force the desired draw order (the last drawn is the one that shows).

 

Even so, you cannot draw an xml gauge over a C/C++ gauge (.gau), and, as I found out, you cannot draw an xml gauge over another xml gauge that contains a customdraw statement (unless the top gauge itself contains a customdraw).

 

However it doesn't work very well even so, the lower gauge is sometimes drawn over the upper one (at a guess, if something changes in it while it doesn't change in the upper gauge) and you get a lot of unsightly flashes.  So I've more or less given up on it for the moment.


(Just to be clear in the above post, it's overlaying an xml gauge over another that has a customdraw that is the problem, xml gauges normally overlay without any problems)

Share this post


Link to post
Share on other sites

Cool , it could be fun to persue .

 

So if I create a dummy xml gauge without any Custom Draw .

then

Overlay that with a second gauge that contains Custom Draw.

it might work.

 

Thanks for the ideas .

I've had a gauge for several years that has frustrated me as I have not been

able to add it as a normal panel entry.

 

Cheers

Karol

Share this post


Link to post
Share on other sites

  • 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.
  • Donation Goals

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    22%
    $5,550.00 of $25,000.00 Donate Now
×
×
  • Create New...