Sign in to follow this  
Guest kwiddler

Alpha-blending an individual meta-panel

Recommended Posts

Hello,I wonder if anybody knows if it is possible to control alpha-blending of an individual add-on gauge or panel, through SimConnect. I have made a transparent panel showing some SimConnect client data. The panel is intended to be a "heads-up display", to be shown on top of all other FSX panels and scenery that might be present. I want the user to be able to adjust the panel's blending level, since some find it too prominent.I call this panel a "meta-panel", since it is not supposed to be aircraft specific, and this leads to my second question. Is there a way I can have this panel be available for all aircraft, without editing each aircraft's panel.cfg file? Currently, I have a DLL SimConnect client and a GAU dll panel, built with gauges.h and all that, written in C.Thanks for any pointers and comments.Kim

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I'll attempt an answer:a) The only way I know to control blending is in the gauge bitmaps and gauge setup (the gauge DLL). I'm not sure if transparency can be controlled through Simconnect as it does not currently provide UI specific interfaces outside of very simple text/menuing. You may be able to layer the gauge via the panel.cfg file however. Also, SimConnect is sockets based, so does not run on FS' UI thread. :( Non-aircraft specific implies a module. It is possible, however creating a modeless window inside FS can be difficult. You can create a module with the panel hooks so you can use panel variables, although modules don't behave exactly like gauges. The callback pointers will be initialized by FS when it loads your dll so you can get somewhere there. Because little (if any at all) UI functionality is documented, this takes a lot of trial and error. It seems that using the WS_POPUP style works in FS9 for child window (parent it to FS98MAIN). However, that has issues with FSX based on my own testing. I'm getting better mileage using the WS_TOOLWINDOW style.It would be very nice if the great folks at ACES would expose and document UI specific calls that allow the safe creation and manipulation of child windows inside the FS space. The key issue seems to be that if the FS rendering engine is not aware of your window (such as that created via the windows API), you easily get into rendering problems because of the DirectX rendering layer, and FS doesn't repaint your window correctly. This causes flicker, z-order problems or other visibility artifacts. The behavior under XP and Vista is also different, because Vista's underlying UI seems to deal with layers much better, and not held up by a 15 year old UI engine.Hope this helps,Etienne

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