This one should use the LED font as well.
[fg:toms-fgdata.git] / Aircraft / Instruments / dme.xml
1 <?xml version="1.0"?>
2
3 <!--
4 Default DME instrument.
5
6 Started summer 2000 by David Megginson, david@megginson.com.
7
8 This is an instrument configuration file for the open-source flight
9 simulator FlightGear (www.flightgear.org).  The file is an XML-encoded
10 FlightGear property list defining the instrument's layers and actions.
11
12 Each instrument is composed of layers stacked on top of each other.
13 A layer may be a texture (with transparent parts to show the layers
14 underneath), text, or a special layer that switches between two
15 others (say, to turn an indicator light on or off).  Each layer can
16 move independently in proportion to a property value, and text
17 can be generated from property values as well: all of the layer's
18 movements are defined as transformations.
19
20 Actions are hotspots on the instrument that will respond to a mouse
21 click.  Actions always modify the values of properties, either by
22 adjusting them, toggling them, or swaping them with other
23 properties' values.
24 -->
25
26 <PropertyList>
27  <name>DME</name>
28  <w-base>128</w-base>
29  <h-base>64</h-base>
30
31  <layers>
32
33   <layer>
34    <name>background</name>
35    <texture>
36     <path>Aircraft/Instruments/Textures/navcom-radios.rgb</path>
37     <x1>0.0</x1>
38     <x2>0.49609375</x2>
39     <y1>0.0</y1>
40     <y2>0.23828125</y2>
41    </texture>
42   </layer>
43
44   <layer>
45    <name>distance to station</name>
46    <type>switch</type>
47    <property>/radios/dme/in-range</property>
48    <w>128</w>
49    <h>64</h>
50    <layer>
51     <name>display</name>
52     <type>text</type>
53     <font>led</font>
54     <point-size>12</point-size>
55     <color>
56      <red>1.0</red>
57      <green>0.5</green>
58      <blue>0.0</blue>
59     </color>
60     <chunks>
61      <chunk>
62       <type>number-value</type>
63       <property>/radios/dme/distance-nm</property>
64       <format>%5.1f</format>
65      </chunk>
66     </chunks>
67    </layer>
68    <layer>
69     <name>display</name>
70     <type>text</type>
71     <font>led</font>
72     <point-size>10</point-size>
73     <color>
74      <red>1.0</red>
75      <green>0.5</green>
76      <blue>0.0</blue>
77     </color>
78     <chunks>
79      <chunk>
80       <type>literal</type>
81       <text>---.--</text>
82      </chunk>
83     </chunks>
84    </layer>
85    <transformations>
86     <transformation>
87      <type>x-shift</type>
88      <offset>-52</offset>
89     </transformation>
90     <transformation>
91      <type>y-shift</type>
92      <offset>10</offset>
93     </transformation>
94    </transformations>
95   </layer>
96
97   <layer>
98    <name>ground speed towards station</name>
99    <type>switch</type>
100    <property>/radios/dme/in-range</property>
101    <layer>
102     <type>text</type>
103     <font>led</font>
104     <point-size>12</point-size>
105     <color>
106      <red>1.0</red>
107      <green>0.5</green>
108      <blue>0.0</blue>
109     </color>
110     <chunks>
111      <chunk>
112       <type>number-value</type>
113       <property>/radios/dme/speed-kt</property>
114       <format>%3.0f</format>
115      </chunk>
116     </chunks>
117    </layer>
118    <layer>
119     <name>display</name>
120     <type>text</type>
121     <font>led</font>
122     <point-size>10</point-size>
123     <color>
124      <red>1.0</red>
125      <green>0.5</green>
126      <blue>0.0</blue>
127     </color>
128     <chunks>
129      <chunk>
130       <type>literal</type>
131       <text>---</text>
132      </chunk>
133     </chunks>
134    </layer>
135    <transformations>
136     <transformation>
137      <type>y-shift</type>
138      <offset>10</offset>
139     </transformation>
140    </transformations>
141   </layer>
142
143   <layer>
144    <name>time to station</name>
145    <type>switch</type>
146    <property>/radios/dme/in-range</property>
147    <layer>
148     <type>text</type>
149     <font>led</font>
150     <point-size>12</point-size>
151     <color>
152      <red>1.0</red>
153      <green>0.5</green>
154      <blue>0.0</blue>
155     </color>
156     <chunks>
157      <chunk>
158       <type>number-value</type>
159       <property>/radios/dme/ete-min</property>
160       <format>%2.0f</format>
161      </chunk>
162     </chunks>
163    </layer>
164    <layer>
165     <name>display</name>
166     <type>text</type>
167     <font>led</font>
168     <point-size>10</point-size>
169     <color>
170      <red>1.0</red>
171      <green>0.5</green>
172      <blue>0.0</blue>
173     </color>
174     <chunks>
175      <chunk>
176       <type>literal</type>
177       <text>--</text>
178      </chunk>
179     </chunks>
180    </layer>
181    <transformations>
182     <transformation>
183      <type>y-shift</type>
184      <offset>10</offset>
185     </transformation>
186     <transformation>
187      <type>x-shift</type>
188      <offset>36</offset>
189     </transformation>
190    </transformations>
191   </layer>
192
193   <layer>
194    <name>knob</name>
195    <texture>
196     <path>Aircraft/Instruments/Textures/navcom-radios.rgb</path>
197     <x1>0.53125</x1>
198     <x2>0.59765625</x2>
199     <y1>0.05859375</y1>
200     <y2>0.1484375</y2>
201    </texture>
202    <w>16</w>
203    <h>20</h>
204    <transformations>
205     <transformation>
206      <type>y-shift</type>
207      <offset>-24</offset>
208     </transformation>
209     <transformation>
210      <type>rotation</type>
211      <property>/radios/dme/switch-position</property>
212      <min>0</min>
213      <max>3</max>
214      <scale>45</scale>
215      <offset>-90</offset>
216     </transformation>
217     <transformation>
218     <type>y-shift</type>
219     <offset>-4.0</offset>
220     </transformation>
221    </transformations>
222   </layer>
223
224  </layers>
225
226  <actions>
227
228   <action>
229    <name>Rotate knob left</name>
230    <button>0</button>
231    <x>-32</x>
232    <y>-32</y>
233    <w>32</w>
234    <h>32</h>
235    <binding>
236     <command>property-adjust</command>
237     <property>/radios/dme/switch-position</property>
238     <step>-1</step>
239     <min>0</min>
240     <max>3</max>
241     <wrap>0</wrap>
242    </binding>
243   </action>
244
245   <action>
246    <name>Rotate knob right</name>
247    <button>0</button>
248    <x>0</x>
249    <y>-32</y>
250    <w>32</w>
251    <h>32</h>
252    <binding>
253     <command>property-adjust</command>
254     <property>/radios/dme/switch-position</property>
255     <step>1</step>
256     <min>0</min>
257     <max>3</max>
258     <wrap>0</wrap>
259    </binding>
260   </action>
261
262  </actions>
263
264 </PropertyList>