XML: Escape Sequences: Difference between revisions
From FSDeveloper Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox-Applicable-FSVersion | |||
| FSXI = false | |||
| FSXA = true | |||
| FSX = true | |||
| FS2004 = true | |||
| FS2002 = false | |||
| FS2000 = unknown | |||
| FS98 = unknown | |||
}} | |||
The following list describes the XML Escape Sequences that may be used within a <String> statement: | The following list describes the XML Escape Sequences that may be used within a <String> statement: | ||
Line 5: | Line 14: | ||
'''\{fnt1}''' | '''\{fnt1}''' | ||
switch to the first alternate font specified as a child of the gauge text element | 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"/> | |||
'''<Font FontSize="19"/>''' | |||
<String>DME MODE %\{clr2}'''\{fnt1}'''%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String> | |||
</FormattedText> | |||
'''\{fnt}''' | '''\{fnt}''' | ||
Line 25: | Line 45: | ||
underline | underline | ||
'''\{itl}''' | '''\{itl}''' | ||
italic | italic | ||
Line 48: | Line 67: | ||
'''\{clr2}''' | '''\{clr2}''' | ||
switch to the | 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"/>''' | |||
<Font FontSize="19"/> | |||
<String>DME MODE %'''\{clr2}'''\{fnt1}%((L:DME_Source,bool) !)%{if}%NAV1%{else}NAV2%{end}</String> | |||
</FormattedText> | |||
'''\{bck}''' | '''\{bck}''' | ||
Line 70: | Line 100: | ||
'''\{ladj=L}''' | '''\{ladj=L}''' | ||
set horizontal text alignment to left. (use ‘C’ for center or ‘R’ for right) '''Note: I've never gotten this to work!''' | set horizontal text alignment to left. (use ‘C’ for center or ‘R’ for right) | ||
'''''Note: I've never gotten this to work!''''' | |||
'''\{line=240}''' | '''\{line=240}''' | ||
Line 83: | Line 114: | ||
'''\{img1}''' | '''\{img1}''' | ||
insert image #1 (a text element can have image children) | 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.'' | |||
[[Category:Aircraft Design]] | [[Category:Aircraft Design]] | ||
[[Category:Panel | [[Category:Panel and Gauge Design]] |
Latest revision as of 13:51, 22 August 2011
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.