tgibson
Resource contributor
- Messages
- 11,875
- Country

Hi,
I have a simple piece of gauge code that swaps text color based on certain conditions. This code works perfectly in FS9 (swaps between green and black text color), but in FSX it has a different behavior:
1. If the plane is loaded with black text displayed (@COL_VALUE), when the color swap happens the text just disappears. I can go back and forth - black, missing, black, missing.
2. If the plane is loaded with green text displayed (#267E77), then the same thing happens. This time it's green, missing, green, missing, etc.
I checked the values in the visible statements and they are alternating between 0 and 1 (and 1 and 0) as expected.
The code:
Is there any way to avoid this behavior in FSX, short of Formatted Text?
Thanks,
I have a simple piece of gauge code that swaps text color based on certain conditions. This code works perfectly in FS9 (swaps between green and black text color), but in FSX it has a different behavior:
1. If the plane is loaded with black text displayed (@COL_VALUE), when the color swap happens the text just disappears. I can go back and forth - black, missing, black, missing.
2. If the plane is loaded with green text displayed (#267E77), then the same thing happens. This time it's green, missing, green, missing, etc.
I checked the values in the visible statements and they are alternating between 0 and 1 (and 1 and 0) as expected.
The code:
Code:
<Element>
<Visible> (A:GENERAL ENG1 COMBUSTION, bool) ! (A:GENERAL ENG2 COMBUSTION, bool) ! (A:GENERAL ENG3 COMBUSTION, bool) ! (A:GENERAL ENG4 COMBUSTION, bool) ! && && && (A:SIM ON GROUND, bool) && (A:BRAKE PARKING POSITION, bool) && </Visible>
<Position X="80" Y="360"/>
<Text X="125" Y="@YSIZE" Bright="Yes" Length="85" Font="@FONT_TRG" Color="#267E77" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
<String>%(@Total_Fuel)%!5d! lbs</String>
</Text>
</Element>
<Element>
<Visible> (A:GENERAL ENG1 COMBUSTION, bool) (A:GENERAL ENG2 COMBUSTION, bool) (A:GENERAL ENG3 COMBUSTION, bool) (A:GENERAL ENG4 COMBUSTION, bool) || || || (A:SIM ON GROUND, bool) ! || (A:BRAKE PARKING POSITION, bool) ! || </Visible>
<Position X="80" Y="360"/>
<Text X="125" Y="@YSIZE" Bright="Yes" Length="85" Font="@FONT_TRG" Color="@COL_VALUE" Adjust="Right" VerticalAdjust="Center" Multiline="No" Fixed="No">
<String>%(@Total_Fuel)%!5d! lbs</String>
</Text>
</Element>
Is there any way to avoid this behavior in FSX, short of Formatted Text?
Thanks,



