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

FSX Green Font?

Messages
10,163
Country
us-arizona
Hey all,

I am having an issue with getting a green font color to appear in a gauge in FSX.

I have tried Hex colors #00FF00 and #00CC00 (really nice green colors) and tried 'Green' as well. Nothing is showing up?!

Any idea's?


The code works great with other colors and the visibility is good, works with other script blocks.

<Element>
<Position X="129" Y="124"/>
<Visible> (A:AUTOPILOT MASTER, bool) </Visible>
<Text X="200" Y="20" Bright="Yes" Length="120" Font="Nasalization" FontSize="28" Color="#00FF00" Adjust="Right" VerticalAdjust="Center" Multiline="No">
<String>Cruise</String>
</Text>
</Element>




Bill
 
Continuing to test, and I find something that only makes sense.. (with FSX).


All my other visibilities work great except with this font, which says 'cruise' and another says 'control'. There are two sets, one in blue that show up when AP is off, and a set in green that show up when AP is 'on'.

Oddly, in FSX, none of the green fonts are working, non show when AP is on, but all the other button graphics and icons show up with AP 'on' visibility code.

Just for checking, I tried 0 ! (zero not!) to see if that would trigger one of the words. I had changed it to blue to see if it would make a difference, blue, green, (maybe green shorts out gauge strings? Who knows with this fabulous sim). Well, the command, zero-not actually worked.

I then tried it with #00CC00 and that too works, green shows up fine! I then made the first word also with the 'zero not!' and now both green font string sets show up 'when AP is on AND off....'


So.. Maybe I have something in my gauge that is doing this, as I dont think FSX is this ingenious to mess with my mind.


Present font script blocks;

<Element>
<Position X="129" Y="124"/>
<Visible> (A:AUTOPILOT MASTER, bool) 0 !</Visible>
<Text X="200" Y="20" Bright="Yes" Length="120" Font="Nasalization" FontSize="28" Color="#00CC00" Adjust="Right" VerticalAdjust="Center" Multiline="No">
<String>Cruise</String>
</Text>
</Element>

<Element>
<Position X="129" Y="149"/>
<Visible> (A:AUTOPILOT MASTER, bool) 0 !</Visible>
<Text X="200" Y="20" Bright="Yes" Length="120" Font="Nasalization" FontSize="28" Color="#00CC00" Adjust="Right" VerticalAdjust="Center" Multiline="No">
<String>Control</String>
</Text>
</Element>


Figure the blue blocks are the same as above but with viz being this;
<Visible> (A:AUTOPILOT MASTER, bool) 0 == </Visible>
 
Bloodystupidfreakinglunaticthingthatneverwantstoworkrightasitseemstobefilledwithaboutfivethousandbugsinit,Iamamazedthefreakingsimcanruninthefirstplace.Iamsotiredofthesedangbugs......
 
There's got to be something else going on, because I just tried it in my FSX "logic diagnostic panel" and it's working just fine! I did use the "Glass Gauge" font since I don't have that weird named one you're using... ;)

Code:
  <Element>
    <Position X="129" Y="124"/>
    <Visible>(A:AUTOPILOT MASTER, bool) 0 !</Visible>
    <Text X="200" Y="20" Bright="Yes" Length="120" Font="Nasalization" FontSize="28" Color="#00CC00" Adjust="Right" VerticalAdjust="Center" Multiline="No">
      <String>Cruise</String>
    </Text>
  </Element>
 
Bill, here is an example of the simplicity of <FormattedText..../>
Code:
  <Element>
    <Position X="129" Y="124"/>
    <FormattedText X="65" Y="45" Font="Nasalization" FontSize="20" LineSpacing="0" Adjust="Center" Color="Red" Bright="Yes">
      <Color Value="Lime"/>
      <String>
        %((A:AUTOPILOT MASTER, bool) 1 ==)
        %{if}
        %Cruise
        %\n
        %Control
        %{else}
        %\{clr2}
        %Cruise
        %\n
        %Control
      </String>
    </FormattedText>
  </Element>

Note the following:
  1. As in normal <Text.../> the x and y position refers to the Top Left Corner of the text display box.
  2. As in normal <Text.../> the X and Y size values are the length and height of the text display box.
  3. Unlike normal <Text.../> the exact FontSize is clearly defined. No guess work here!
  4. The primary color is defined in the main parameter list: Color="Red" (you can use Color="FF0000" if you prefer)
  5. The alternate color is defined on the next line as <Color Value="Lime"/>
  6. For easier reading, I've listed each step as a new line, each of which begins with the "evaluate the following" command token "%"
  7. The first step is to provide the "conditions" for the display, in this case whether the Autopilot is On or Off.
  8. The second step is of course the %{if} (TRUE) part of the display. You should be able to easily follow the rest of the steps.
  9. %\n means "make a new line" (same as Enter key). I used this so I only need one <Element> to display the two words:
    • Cruise
    • Control
  10. %\{clr2} means "use the alternate color now"
    • Cruise
    • Control
 
Last edited:
This works! Schweeet!

Thanks Bill!



I did note that with a secondary condition, it does the same thing. Perhaps its with two or more conditions that the string 'color swap' bug occurrs?


<-- off to reformat the fonts over to these new stacks and see if all works

Bill
 
I made a nice little discovery.

If I 'stack' the dual conditions as below, the dual color works again, not cancelling out color two.

Ureka!


Code:
<!--  HDG FONT  -->
      <Element>
        <Position X="30" Y="250"/>
    <FormattedText X="100" Y="50" Font="Nasalization" FontSize="28" LineSpacing="0" Adjust="Left" VerticalAdjust="Top" Color="#00CC00" Bright="Yes">
      <Color Value="#3366FF"/>
      <String>
        %((A:AUTOPILOT HEADING LOCK, bool) 1 ==
          (A:AUTOPILOT MASTER, bool) 1 ==
          and
        )
        %{if}
        %HDG
        %{else}
        %\{clr2}
        %HDG
      </String>
    </FormattedText>
  </Element>

Many thanks Bill Leaming. Many thanks..


Bill
 
I made a nice little discovery.

If I 'stack' the dual conditions as below, the dual color works again, not cancelling out color two.

Well, yes it works. You could "stack" a thousand conditions in there and it'd still work. I honestly don't know why folks have such a reluctance to even try <FormattedText>...

It is so very flexible and extensible. You could easily create one <Element> that would fill an entire PAGE with <Formatted Text>. In fact, I have done so. You could also have 50 different colors if you had some burning need to do so.

How do you suppose I create all of my "popup pages" in the G1000? I draw whatever I want in Photoshop, then simply measure the x,y coordinates directly from Photoshop and use them in the XML script(s). I can even use the same FontSize(s) and Fonts that I've used in the Photoshop image.

If you create an "empty template" for a <FormattedText> element, you can copy/paste/edit as needed for each <Element> you want to create.

The only reason I included both "Cruise" and "Control" in the same <String> was simply to show how the %\n (NewLine) command may be used. :teacher:
 
Last edited:
Well, yes it works. You could "stack" a thousand conditions in there and it'd still work. I honestly don't know why folks have such a reluctance to even try <FormattedText>...

It is so very flexible and extensible. You could easily create one <Element> that would fill an entire PAGE with <Formatted Text>. In fact, I have done so. You could also have 50 different colors if you had some burning need to do so.

How do you suppose I create all of my "popup pages" in the G1000? I draw whatever I want in Photoshop, then simply measure the x,y coordinates directly from Photoshop and use them in the XML script(s). I can even use the same FontSize(s) and Fonts that I've used in the Photoshop image.

If you create an "empty template" for a <FormattedText> element, you can copy/paste/edit as needed for each <Element> you want to create.

The only reason I included both "Cruise" and "Control" in the same <String> was simply to show how the %\n (NewLine) command may be used. :teacher:




Thanks Bill. Also thanks for that last part, the 'new line'. I had wanted to use that but could never figure out how that was used, so I had to go with dual elements for two lines. arrgh.. .

Yes, on the copy/paste new sections for new verbage on the PFD and MFD screens. So modular. Makes it really quick to go in and start creating a new one fresh from the start.

I dont think using FormattedText is the issue, it was that I started out 'copy/pasting' sections that I had started in normal Text with, and so by the time I was done, they were simply all regular text. I know now for the next time.

I thought FSX had an issue with green, lololol... I thought, 'man, this sim REALLY hates me! now it will not take green??? arrghh!!!'
 
If you think the new line is neat, try out the %/t (tab) function! That's truly awesome.

You can define a list of "tabs" in the <String> parameter list to set up columnar displays, e.g.:

Code:
            <String>
              \{tabs=0,152R}
              %GPS\t
              %((@g:modeCDI))
              %{case}
              %{:1}ENR
              %{:2}TERM
              %{:3}APR
              %{end}
            </String>
Note that the first entry is the \{tabs=n1,n2,nx} list. In this case a "tab" is set at 0 and another at 152R (right justified).

The "GPS" text is placed a x=0 (left margin) and one of the three labels is placed at x=152R:

GPS
ENR​
 
If you think the new line is neat, try out the %/t (tab) function! That's truly awesome.

You can define a list of "tabs" in the <String> parameter list to set up columnar displays, e.g.:

Code:
            <String>
              \{tabs=0,152R}
              %GPS\t
              %((@g:modeCDI))
              %{case}
              %{:1}ENR
              %{:2}TERM
              %{:3}APR
              %{end}
            </String>
Note that the first entry is the \{tabs=n1,n2,nx} list. In this case a "tab" is set at 0 and another at 152R (right justified).

The "GPS" text is placed a x=0 (left margin) and one of the three labels is placed at x=152R:

GPS
ENR​


Thanks Bill!
 
Back
Top