Sign in to follow this  
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
Help AVSIM continue to serve you!
Please donate today!

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.

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.

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:

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

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