• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 Light Overlay Problems!

Messages
206
Country
unitedkingdom
Hi,

Sorry if this is posted previously, my search did not find anything related but perhaps I used the wrong keywords?

Ok, so I have an overhead panel with lots of switches and gauges etc, and I want to have some night lighting that is independant from the FS9 cabin light variable so I did the following:

1) Made a bitmap with the 'night lighting' which is mostly just the switch labels etc on a black (RGB 0,0,0) background and saved it in 256 colours format.
2) Made a small XML gauge that either shows the bitmap bright, or not bright, depending on the state of an L:Var (reads if there is power connected from any source).
3) Added it to the panel as the first entry - ie. all the other stuff /should/ be on top of it...

Code:
<Gauge Name="GC_oVERHEAD_lIGHTS" Version="1.0">
<Update Frequency="6"/>
<Size X="2048" Y="1518"/>
<Element>
<Select>
	<Value>(L:ElecAVAIL, enum)</Value>
		<Case Value="0">
		<Position X="0" Y="0"/>
		<Image Name="over717_LTS.bmp" Bright="No" Luminous="No"/>
		</Case>
	        <Case Value="1">
		<Position X="0" Y="0"/>
		<Image Name="over717_LTS.bmp" Bright="Yes" Luminous="Yes"/>
		</Case>
</Select>
</Element>
</Gauge>

It looks like it is working just fine until the 'trigger' state is seen - ie available power is turned on or off - and the bmp does indeed change, but seems also to cover / hide all the other gauges on the overhead!!! It 'recovers' from this if I toggle the battery switch a couple of times, and a no power state is hopefully quite rare in FS operation, but still it is not ideal.

What have I done wrong, and what is the trick to fixing it?? I suppose there needs to be a way to make all the gauges re-draw after the change but I thought that they would do so per cycle..? The alternative would be to have overlayed panels I suppose but that leads to an awful mess if moving panels with the mouse or running FS in windowed mode...

Geoff
 
Try to add the line draw_order00=gauge00, gauge01, gauge02,... in the WindowXX section. This will force gauges 01, 02, etc. to refresh whenever gauge00 change its state.
 
Last edited:
Try to add the line draw_order00=gauge00, gauge01, gauge02,... in the WindowXX section. This will force gauges 01, 02, etc. to refresh whenever gauge00 change its state.

Thanks, that mostly works - I had to write it in for about 84 gauges! The problem now appears rarely instead of all the time... but it still does happen. Suppose there is no way to completely eliminate it then?

Geoff
 
I dont know. I previously tried this approach, but I gave up, because it affects the fps.

Another approach is to put all the gauges in the same xml, so the whole panel will be only one (large) gauge00:

Code:
<Gauge>
  <Size X="2048" Y="1518"/>

  <Element Name="GC_oVERHEAD_lIGHTS">
    <Select>
      <Value>(L:ElecAVAIL, enum)</Value>
      <Case Value="0"><Image Name="over717_LTS.bmp" Bright="No" Luminous="No"/></Case>
      <Case Value="1"><Image Name="over717_LTS.bmp" Bright="Yes" Luminous="Yes"/></Case>
    </Select>
  </Element>

  <Element Name="gauge01">
    <Position X="..." Y="..."/> ([I]* gauge01 position from panel.cfg *[/I])
      ([I]* put Elements from gauge01 here *[/I])
  </Element>

  <!-- [I]same for gauge02 to gauge84 Elements[/I] -->

  <Mouse>

    <Area Left="..." Top="..." Width="..." Height="..."> (* gauge01 position and dimensions from panel.cfg *)
      (* [I]put mouse Areas from gauge01 here[/I] *)
    </Area>
		
    <!-- [I]same for gauge02 to gauge84 Areas[/I] -->
		
  </Mouse>
	
</Gauge>

Here should be paid attention to G-vars, if any. Also, if there Clip tags, their coordinates must be recalculated.

Btw, whether in the panel has a lot of custom-draw elements (rect's, polys, formated text ...)? I noticed on one of my xml's, which contains many overlapping custom-draw elements, that there is a flicker, but only in 2D cockpit when FS is in ful screen mode. Now instead of one xml without bitmaps, I use xml with about 80 bitmaps. :(
 
I dont know. I previously tried this approach, but I gave up, because it affects the fps.

Another approach is to put all the gauges in the same xml, so the whole panel will be only one (large) gauge00:

...

Here should be paid attention to G-vars, if any. Also, if there Clip tags, their coordinates must be recalculated.

Btw, whether in the panel has a lot of custom-draw elements (rect's, polys, formated text ...)? I noticed on one of my xml's, which contains many overlapping custom-draw elements, that there is a flicker, but only in 2D cockpit when FS is in ful screen mode. Now instead of one xml without bitmaps, I use xml with about 80 bitmaps. :(

Eek, that would mean a lot of re-coding and coordinate changing which I'd really rather not do! I have seen that in commercial aircraft packages the gauge to do this is usually a .gau file rather than xml, even if much of the rest is xml... Is there a reason for that? Something that just works better that way?

Geoff
 
Geoff, that's done in commercial releases primarly to prevent the "borrowing" of guage code/script, bitmaps, etc. for use in another project... ;)
 
Geoff, that's done in commercial releases primarly to prevent the "borrowing" of guage code/script, bitmaps, etc. for use in another project... ;)

Ahaa, I see! In that case I'll stick with the "draw order" method.

Geoff
 
Back
Top