XML: Escape Sequences: Difference between revisions
From FSDeveloper Wiki
Jump to navigationJump to search
m (Added FSVersion infobox) |
No edit summary |
||
| Line 17: | Line 17: | ||
example: | example: | ||
<FormattedText X="255" Y="20" | <FormattedText X="255" Y="20" | ||
Font="Arial Bold" FontSize="14" LineSpacing="0" | Font="Arial Bold" FontSize="14" LineSpacing="0" | ||
| Line 22: | Line 23: | ||
Color="White" Bright="Yes"> | Color="White" Bright="Yes"> | ||
<Color Value="Cyan"/> | <Color Value="Cyan"/> | ||
<Font FontSize="19"/> | '''<Font FontSize="19"/>''' | ||
<String>DME MODE %\{clr2}\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String> | <String>DME MODE %\{clr2}'''\{fnt1}'''%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String> | ||
</FormattedText> | </FormattedText> | ||
| Line 70: | Line 71: | ||
example: | example: | ||
<FormattedText X="255" Y="20" | <FormattedText X="255" Y="20" | ||
Font="Arial Bold" FontSize="14" LineSpacing="0" | Font="Arial Bold" FontSize="14" LineSpacing="0" | ||
VerticalAdjust="Center" Adjust="Left" | VerticalAdjust="Center" Adjust="Left" | ||
Color="White" Bright="Yes"> | Color="White" Bright="Yes"> | ||
<Color Value="Cyan"/> | '''<Color Value="Cyan"/>''' | ||
<Font FontSize="19"/> | <Font FontSize="19"/> | ||
<String>DME MODE %\{clr2}\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String> | <String>DME MODE %'''\{clr2}'''\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String> | ||
</FormattedText> | </FormattedText> | ||
| Line 115: | Line 117: | ||
example: | example: | ||
<Image Name="Vor.bmp"/> | <Image Name="Vor.bmp"/> | ||
<Image Name="Vor_Dme.bmp"/> | <Image Name="Vor_Dme.bmp"/> | ||
| Line 123: | Line 125: | ||
<Image Name="Localizer.bmp"/> | <Image Name="Localizer.bmp"/> | ||
<String> | <String> | ||
\{img%((@c:NearestVorCurrentType))%{case}%{:1}1%{:2}2%{:3}3%{:4}4%{:5}5%{:6}6%{end}}\t | '''\{img'''%((@c:NearestVorCurrentType))%{case}%{:1}1%{:2}2%{:3}3%{:4}4%{:5}5%{:6}6%{end}}\t | ||
</String> | </String> | ||
Revision as of 11:06, 5 September 2009
The following list describes the XML Escape Sequences that may be used within a <String> statement:
\{tabs=50R,60C, 244L}
set 3 tab stops; the first is right-aligned, the second is centered, and last is left-aligned.
\{fnt1}
switch to the first alternate font size specified as a child of the gauge text element
example:
<FormattedText X="255" Y="20"
Font="Arial Bold" FontSize="14" LineSpacing="0"
VerticalAdjust="Center" Adjust="Left"
Color="White" Bright="Yes">
<Color Value="Cyan"/>
<String>DME MODE %\{clr2}\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String>
</FormattedText>
\{fnt}
return to the default font
\{up}
superscript
\{dn}
subscript
\{md}
normal (neither superscript nor subscript)
\{bo}
bold
\{ul}
underline
\{itl}
italic
\{strk}
strikeout
\{blnk}
blink
\{rev}
reverse background/foreground color for text
\{nr}
normal - clear all properties previously set.
\{lcl}
line color
\{blc}
background line color
\{clr2}
switch to the first alternate color specified as a child of the gauge text element
example:
<FormattedText X="255" Y="20"
Font="Arial Bold" FontSize="14" LineSpacing="0"
VerticalAdjust="Center" Adjust="Left"
Color="White" Bright="Yes">
<Color Value="Cyan"/>
<String>DME MODE %\{clr2}\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String>
</FormattedText>
\{bck}
background color
\{strk}
strikeout
\{dplo=M}
put a degrees symbol above the next character after the ‘=’ In this case a º will be placed over the M for only a degrees symbol, leave a blank space in place of the M
\{dpl=XY}
make X superscript and Y subscript
\{lsp=23}
set line spacing to 23
\{lsp}
set line spacing to default
\{ladj=L}
set horizontal text alignment to left. (use ‘C’ for center or ‘R’ for right) Note: I've never gotten this to work!
\{line=240}
draw a horizontal line with width 240
\{lmrg=20}
set the left margin to 20
\{rmrg=30}
set the right margin to 30
\{img1}
insert image #1 (a text element can have image children) example:
<Image Name="Vor.bmp"/>
<Image Name="Vor_Dme.bmp"/>
<Image Name="Dme.bmp"/>
<Image Name="Tacan.bmp"/>
<Image Name="VorTac.bmp"/>
<Image Name="Localizer.bmp"/>
<String>
\{img%((@c:NearestVorCurrentType))%{case}%{:1}1%{:2}2%{:3}3%{:4}4%{:5}5%{:6}6%{end}}\t
</String>
Note: in the above example, the image displayed will be based on an index value returned by the
request from the GPS for the VOR Type.