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

Text Strings

Messages
34
Country
unitedkingdom
I'm making a gauge that shows as much info as possible about engine parameters for small GA aircraft. I got inspiration from TK Elektronics.

This is my progress after about an hour:

4yzzchu.jpg


As you can see it works for the most part but i'm not happy with a few things. Here's some code:

Code:
<!--==== OAT ====-->
<Element>
	<Position X="184" Y="110"/>
	<Text Bright="Yes" X="85" Y="30" FontSize="20" Length="5" Fixed="Yes" Font="Arial" Color="#2b2b2b" Adjust="Right" VerticalAdjust="Center">
	<String>%((A:AMBIENT TEMPERATURE, celsius))%!3d!&# 176;C</String>
	</Text>
</Element>

I wish to use the font in bold style, rather than cheating and simply setting the font to Arial Black I wish to use the style string '\{bo}' but i have no idea how to actually put that into practice.

Maybe if I can style it I could also change the string so if EGT or CHT for example were to breech a max temp I could make the number blink... :rolleyes:
 
Last edited:
Very nice! :D

The "escape codes" only work in a <FormattedText> section. If you examine the XML script for the G500 for example, you'll see entries such as this:

Code:
<!-- General purpose macros -->
<Macro Name="BlinkerCode">(@g:menuBlinker) d 0 &gt; if{ -- (&gt;@g:menuBlinker) 15 sp0 1 } els{ l0 -- s0 d 0 &lt;= if{ 30 sp0 } 15 &gt; }</Macro>


                     <Element>
                        <Position X="10" Y="5"/>
                        <FormattedText X="256" Y="180" Font="Arial Black" FontSize="14" LineSpacing="17" Color="0x00FF00" Bright="Yes" Tabs="0,170C,220R">
                           <Font FontSize="12"/>
                           <ScrollY>(@g:listScroll)</ScrollY>
                           <BlinkCode>@BlinkerCode</BlinkCode>
                           <String>
								%((@c:WaypointAirportFrequenciesNumber) s2 0 !=)
								%{if}
									%(0 sp1)
									%{loop}
										%(l1 (&gt;@c:WaypointAirportCurrentFrequency))
										%((@g:listCurrent) l1 == (@g:listItems) 1 == and)%{if}\{blnk}%{end}
										%((@c:WaypointAirportFrequencyName))%!s!\{nr}\t
										%((@c:WaypointAirportFrequencyLimit))%{case}%{:1}\{dpl=RX}%{:2}\{dpl=TX}%{end}\t
										%((@c:WaypointAirportFrequencyValue,Mhz) 100 * near d 100 div)%!03d!.\{fnt1}%(100 %)%!02d!\{fnt}
										\n
										%(l1 ++ s1 l2 &lt;)
									%{next}
								%{end}
							</String>
                        </FormattedText>
                     </Element>

Note that typical usage is to place the desired escape sequence before the "action" and then the opposite escape sequence after the "action."

In the case of /{bo} you would typically use /{md} to restore to "normal" text.

For a complete list of the "Escape Sequences" available for use, see:

http://blogs.technet.com/engauged/archive/2006/12/08/text-in-xml-gauges-part-iii.aspx#comments
 
Last edited:
Back
Top