Debian Codegraph @

Aircraft/c172p/gui/dialogs/c172p-right-fuel-sample.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4
5 <name>c172p-right-fuel-sample-dialog</name>
6 <layout>vbox</layout>
7 <resizable>false</resizable>
8 <modal>false</modal>
9 <draggable>true</draggable>
10
11 <group>
12 <layout>hbox</layout>
13
14 <empty><stretch>true</stretch></empty>
15 <text>
16 <label>Right Fuel Tank Sampling</label>
17 </text>
18 <empty><stretch>true</stretch></empty>
19
20 <button>
21 <legend>X</legend>
22 <key>Esc</key>
23 <halign>right</halign>
24 <pref-width>20</pref-width>
25 <pref-height>20</pref-height>
26 <binding>
27 <command>dialog-close</command>
28 </binding>
29 </button>
30 </group>
31
32 <hrule/>
33
34 <group>
35 <layout>vbox</layout>
36 <default-padding>6</default-padding>
37 <empty><stretch>true</stretch></empty>
38 <button>
39 <legend>Take a sample</legend>
40 <equal>true</equal>
41 <default>false</default>
42 <enable>
43 <and>
44 <not>
45 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
46 </not>
47 <!-- checking if there is at least 50ml of fuel in the tanks -->
48 <or>
49 <greater-than>
50 <property>/consumables/fuel/tank[1]/level-gal_us</property>
51 <value>0.0132086</value>
52 </greater-than>
53 <greater-than>
54 <property>/consumables/fuel/tank[3]/level-gal_us</property>
55 <value>0.0132086</value>
56 </greater-than>
57 </or>
58 <less-than>
59 <property>velocities/groundspeed-kt</property>
60 <value>1.0</value>
61 </less-than>
62 </and>
63 </enable>
64 <binding>
65 <condition>
66 <not>
67 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
68 </not>
69 </condition>
70 <command>nasal</command>
71 <script>c172p.take_fuel_sample(1);</script>
72 </binding>
73 <binding>
74 <command>property-assign</command>
75 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
76 <value>true</value>
77 </binding>
78 </button>
79 <button>
80 <legend>Discard sample</legend>
81 <equal>true</equal>
82 <default>false</default>
83 <enable>
84 <and>
85 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
86 <less-than>
87 <property>velocities/groundspeed-kt</property>
88 <value>1.0</value>
89 </less-than>
90 </and>
91 </enable>
92 <binding>
93 <command>property-assign</command>
94 <property>/consumables/fuel/tank[1]/sample-water-contamination</property>
95 <value>0.0</value>
96 </binding>
97 <binding>
98 <command>property-assign</command>
99 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
100 <value>false</value>
101 </binding>
102 </button>
103 <button>
104 <legend>Return sample to the tank</legend>
105 <equal>true</equal>
106 <default>false</default>
107 <enable>
108 <and>
109 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
110 <less-than>
111 <property>velocities/groundspeed-kt</property>
112 <value>1.0</value>
113 </less-than>
114 </and>
115 </enable>
116 <binding>
117 <condition>
118 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
119 </condition>
120 <command>nasal</command>
121 <script>c172p.return_fuel_sample(1);</script>
122 </binding>
123 <binding>
124 <command>property-assign</command>
125 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
126 <value>false</value>
127 </binding>
128 </button>
129 </group>
130
131 <group>
132 <layout>hbox</layout>
133 <text>
134 <visible>
135 <greater-than-equals>
136 <property>velocities/groundspeed-kt</property>
137 <value>1.0</value>
138 </greater-than-equals>
139 </visible>
140 <color>
141 <red>0.9</red>
142 <green>0.1</green>
143 <blue>0.1</blue>
144 </color>
145 <label>Dialog disabled when in movement</label>
146 </text>
147 </group>
148
149 <hrule/>
150
151 <group>
152 <layout>hbox</layout>
153 <padding>6</padding>
154 <group>
155 <layout>hbox</layout>
156 <text>
157 <label>Fuel sample colour:</label>
158 <halign>left</halign>
159 </text>
160 </group>
161 <group>
162 <layout>table</layout>
163 <text>
164 <row>0</row>
165 <col>0</col>
166 <visible>
167 <and>
168 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
169 <equals>
170 <property>/consumables/fuel/tank[1]/sample-water-contamination</property>
171 <value>0.0</value>
172 </equals>
173 </and>
174 </visible>
175 <color>
176 <red>0.22</red>
177 <green>0.69</green>
178 <blue>0.87</blue>
179 </color>
180 <label>light blue</label>
181 </text>
182 <text>
183 <row>0</row>
184 <col>0</col>
185 <visible>
186 <and>
187 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
188 <greater-than>
189 <property>/consumables/fuel/tank[1]/sample-water-contamination</property>
190 <value>0.0</value>
191 </greater-than>
192 <less-than>
193 <property>/consumables/fuel/tank[1]/sample-water-contamination</property>
194 <value>0.2</value>
195 </less-than>
196 </and>
197 </visible>
198 <color>
199 <red>0.22</red>
200 <green>0.69</green>
201 <blue>0.87</blue>
202 </color>
203 <label>part light blue</label>
204 </text>
205 <text>
206 <row>0</row>
207 <col>2</col>
208 <visible>
209 <and>
210 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
211 <greater-than>
212 <property>/consumables/fuel/tank[1]/sample-water-contamination</property>
213 <value>0.0</value>
214 </greater-than>
215 <less-than>
216 <property>/consumables/fuel/tank[1]/sample-water-contamination</property>
217 <value>0.2</value>
218 </less-than>
219 </and>
220 </visible>
221 <color>
222 <red>0.84</red>
223 <green>0.84</green>
224 <blue>0.84</blue>
225 </color>
226 <label>part transparent</label>
227 </text>
228 <text>
229 <row>0</row>
230 <col>0</col>
231 <visible>
232 <and>
233 <property>/consumables/fuel/tank[1]/fuel-sample-taken</property>
234 <equals>
235 <property>/consumables/fuel/tank[1]/sample-water-contamination</property>
236 <value>0.2</value>
237 </equals>
238 </and>
239 </visible>
240 <color>
241 <red>0.84</red>
242 <green>0.84</green>
243 <blue>0.84</blue>
244 </color>
245 <label>completely transparent</label>
246 </text>
247 </group>
248 </group>
249
250 <hrule/>
251
252 <group>
253 <layout>hbox</layout>
254 <default-padding>6</default-padding>
255 <empty><stretch>true</stretch></empty>
256 <button>
257 <legend>Close</legend>
258 <equal>true</equal>
259 <key>Esc</key>
260 <default>true</default>
261 <binding>
262 <command>dialog-close</command>
263 </binding>
264 </button>
265 </group>
266
267 </PropertyList>