Instruments are now consolidated in a single directory.
[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     <point-size>12</point-size>
54     <color>
55      <red>1.0</red>
56      <green>0.5</green>
57      <blue>0.0</blue>
58     </color>
59     <chunks>
60      <chunk>
61       <type>number-value</type>
62       <property>/radios/dme/distance-nm</property>
63       <format>%5.1f</format>
64      </chunk>
65     </chunks>
66    </layer>
67    <layer>
68     <name>display</name>
69     <type>text</type>
70     <point-size>10</point-size>
71     <color>
72      <red>1.0</red>
73      <green>0.5</green>
74      <blue>0.0</blue>
75     </color>
76     <chunks>
77      <chunk>
78       <type>literal</type>
79       <text>---.--</text>
80      </chunk>
81     </chunks>
82    </layer>
83    <transformations>
84     <transformation>
85      <type>x-shift</type>
86      <offset>-52</offset>
87     </transformation>
88     <transformation>
89      <type>y-shift</type>
90      <offset>10</offset>
91     </transformation>
92    </transformations>
93   </layer>
94
95   <layer>
96    <name>ground speed towards station</name>
97    <type>switch</type>
98    <property>/radios/dme/in-range</property>
99    <layer>
100     <type>text</type>
101     <point-size>12</point-size>
102     <color>
103      <red>1.0</red>
104      <green>0.5</green>
105      <blue>0.0</blue>
106     </color>
107     <chunks>
108      <chunk>
109       <type>number-value</type>
110       <property>/radios/dme/speed-kt</property>
111       <format>%3.0f</format>
112      </chunk>
113     </chunks>
114    </layer>
115    <layer>
116     <name>display</name>
117     <type>text</type>
118     <point-size>10</point-size>
119     <color>
120      <red>1.0</red>
121      <green>0.5</green>
122      <blue>0.0</blue>
123     </color>
124     <chunks>
125      <chunk>
126       <type>literal</type>
127       <text>---</text>
128      </chunk>
129     </chunks>
130    </layer>
131    <transformations>
132     <transformation>
133      <type>y-shift</type>
134      <offset>10</offset>
135     </transformation>
136    </transformations>
137   </layer>
138
139   <layer>
140    <name>time to station</name>
141    <type>switch</type>
142    <property>/radios/dme/in-range</property>
143    <layer>
144     <type>text</type>
145     <point-size>12</point-size>
146     <color>
147      <red>1.0</red>
148      <green>0.5</green>
149      <blue>0.0</blue>
150     </color>
151     <chunks>
152      <chunk>
153       <type>number-value</type>
154       <property>/radios/dme/ete-min</property>
155       <format>%2.0f</format>
156      </chunk>
157     </chunks>
158    </layer>
159    <layer>
160     <name>display</name>
161     <type>text</type>
162     <point-size>10</point-size>
163     <color>
164      <red>1.0</red>
165      <green>0.5</green>
166      <blue>0.0</blue>
167     </color>
168     <chunks>
169      <chunk>
170       <type>literal</type>
171       <text>--</text>
172      </chunk>
173     </chunks>
174    </layer>
175    <transformations>
176     <transformation>
177      <type>y-shift</type>
178      <offset>10</offset>
179     </transformation>
180     <transformation>
181      <type>x-shift</type>
182      <offset>36</offset>
183     </transformation>
184    </transformations>
185   </layer>
186
187   <layer>
188    <name>knob</name>
189    <texture>
190     <path>Aircraft/Instruments/Textures/navcom-radios.rgb</path>
191     <x1>0.53125</x1>
192     <x2>0.59765625</x2>
193     <y1>0.05859375</y1>
194     <y2>0.1484375</y2>
195    </texture>
196    <w>16</w>
197    <h>20</h>
198    <transformations>
199     <transformation>
200      <type>y-shift</type>
201      <offset>-24</offset>
202     </transformation>
203     <transformation>
204      <type>rotation</type>
205      <property>/radios/dme/switch-position</property>
206      <min>0</min>
207      <max>3</max>
208      <scale>45</scale>
209      <offset>-90</offset>
210     </transformation>
211     <transformation>
212     <type>y-shift</type>
213     <offset>-4.0</offset>
214     </transformation>
215    </transformations>
216   </layer>
217
218  </layers>
219
220  <actions>
221
222   <action>
223    <name>Rotate knob left</name>
224    <button>0</button>
225    <x>-32</x>
226    <y>-32</y>
227    <w>32</w>
228    <h>32</h>
229    <binding>
230     <command>property-adjust</command>
231     <property>/radios/dme/switch-position</property>
232     <step>-1</step>
233     <min>0</min>
234     <max>3</max>
235     <wrap>0</wrap>
236    </binding>
237   </action>
238
239   <action>
240    <name>Rotate knob right</name>
241    <button>0</button>
242    <x>0</x>
243    <y>-32</y>
244    <w>32</w>
245    <h>32</h>
246    <binding>
247     <command>property-adjust</command>
248     <property>/radios/dme/switch-position</property>
249     <step>1</step>
250     <min>0</min>
251     <max>3</max>
252     <wrap>0</wrap>
253    </binding>
254   </action>
255
256  </actions>
257
258 </PropertyList>