Debian Codegraph @

gui/dialogs/truman.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4 <name>Truman</name>
5 <modal>false</modal>
6 <layout>vbox</layout>
7
8
9
10
11 <group>
12 <layout>hbox</layout>
13
14 <text>
15 <label>USS Harry S. Truman Controls</label>
16 </text>
17
18 <empty>
19 <stretch>1</stretch>
20 </empty>
21
22 <button>
23 <legend>X</legend>
24 <key>Esc</key>
25 <pref-width>20</pref-width>
26 <pref-height>20</pref-height>
27 <binding>
28 <command>dialog-close</command>
29 </binding>
30 </button>
31 </group>
32
33 <hrule/>
34
35 <group>
36 <layout>table</layout>
37
38 <text>
39 <label>Course</label>
40 <row>0</row>
41 <col>0</col>
42 </text>
43
44 <radio>
45 <row>1</row>
46 <col>0</col>
47 <halign>left</halign>
48 <label>Turn to launch course</label>
49 <property>/controls/truman/turn-to-launch-hdg</property>
50 <live>true</live>
51 <binding>
52 <command>dialog-apply</command>
53 </binding>
54 <binding>
55 <command>nasal</command>
56 <script>
57 var v = getprop("/controls/truman/turn-to-launch-hdg");
58 foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
59
60 if (c.getNode("name").getValue() != nil and c.getNode("name").getValue() == "Truman")
61 {
62 c.getNode("controls/turn-to-launch-hdg").setBoolValue(v);
63 c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0);
64 c.getNode("controls/turn-to-base-course").setBoolValue(0);
65 }
66 }
67
68 setprop("/controls/truman/turn-to-base-course", 0);
69 setprop("/controls/truman/turn-to-recovery-hdg", 0);
70 </script>
71 </binding>
72 </radio>
73
74 <radio>
75 <row>2</row>
76 <col>0</col>
77 <halign>left</halign>
78 <label>Turn to recovery course</label>
79 <property>/controls/truman/turn-to-recovery-hdg</property>
80 <live>true</live>
81 <binding>
82 <command>dialog-apply</command>
83 </binding>
84 <binding>
85 <command>nasal</command>
86 <script>
87 var v = getprop("/controls/truman/turn-to-recovery-hdg");
88 foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
89
90 if (c.getNode("name").getValue() != nil and c.getNode("name").getValue() == "Truman")
91 {
92 c.getNode("controls/turn-to-recovery-hdg").setBoolValue(v);
93 c.getNode("controls/turn-to-launch-hdg").setBoolValue(0);
94 c.getNode("controls/turn-to-base-course").setBoolValue(0);
95 }
96 }
97 setprop("/controls/truman/turn-to-base-course", 0);
98 setprop("/controls/truman/turn-to-launch-hdg", 0);
99 </script>
100 </binding>
101 </radio>
102
103 <radio>
104 <row>3</row>
105 <col>0</col>
106 <halign>left</halign>
107 <label>Turn to base course</label>
108 <property>/controls/truman/turn-to-base-course</property>
109 <live>true</live>
110 <binding>
111 <command>dialog-apply</command>
112 </binding>
113 <binding>
114 <command>nasal</command>
115 <script>
116 var v = getprop("/controls/truman/turn-to-base-course");
117 foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
118
119 if (c.getNode("name").getValue() != nil and c.getNode("name").getValue() == "Truman")
120 {
121 c.getNode("controls/turn-to-base-course").setBoolValue(v);
122 c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0);
123 c.getNode("controls/turn-to-launch-hdg").setBoolValue(0);
124 }
125 }
126 setprop("/controls/truman/turn-to-launch-hdg", 0);
127 setprop("/controls/truman/turn-to-recovery-hdg", 0);
128
129 </script>
130 </binding>
131 </radio>
132 </group>
133
134 <hrule/>
135
136 <group>
137 <layout>table</layout>
138
139 <text>
140 <label>Equipment</label>
141 <row>0</row>
142 <col>0</col>
143 </text>
144
145 <checkbox>
146 <halign>left</halign>
147 <row>1</row>
148 <col>0</col>
149 <label>Elevator 1</label>
150 <property>/controls/truman/elevator[0]/state</property>
151 <binding>
152 <command>dialog-apply</command>
153 </binding>
154 </checkbox>
155
156 <checkbox>
157 <halign>left</halign>
158 <row>1</row>
159 <col>1</col>
160 <label>Elevator 2</label>
161 <property>/controls/truman/elevator[1]/state</property>
162 <binding>
163 <command>dialog-apply</command>
164 </binding>
165 </checkbox>
166
167 <checkbox>
168 <halign>left</halign>
169 <row>1</row>
170 <col>2</col>
171 <label>Elevator 3</label>
172 <property>/controls/truman/elevator[2]/state</property>
173 <binding>
174 <command>dialog-apply</command>
175 </binding>
176 </checkbox>
177
178 <checkbox>
179 <halign>left</halign>
180 <row>1</row>
181 <col>3</col>
182 <label>Elevator 4</label>
183 <property>/controls/truman/elevator[3]/state</property>
184 <binding>
185 <command>dialog-apply</command>
186 </binding>
187 </checkbox>
188
189 <checkbox>
190 <halign>left</halign>
191 <row>2</row>
192 <col>0</col>
193 <label>Door 1</label>
194 <property>/controls/truman/door[0]/state</property>
195 <binding>
196 <command>dialog-apply</command>
197 </binding>
198 </checkbox>
199
200 <checkbox>
201 <halign>left</halign>
202 <row>2</row>
203 <col>1</col>
204 <label>Door 2</label>
205 <property>/controls/truman/door[1]/state</property>
206 <binding>
207 <command>dialog-apply</command>
208 </binding>
209 </checkbox>
210
211 <checkbox>
212 <halign>left</halign>
213 <row>2</row>
214 <col>2</col>
215 <label>Door 3</label>
216 <property>/controls/truman/door[2]/state</property>
217 <binding>
218 <command>dialog-apply</command>
219 </binding>
220 </checkbox>
221
222 <checkbox>
223 <halign>left</halign>
224 <row>2</row>
225 <col>3</col>
226 <label>Door 4</label>
227 <property>/controls/truman/door[3]/state</property>
228 <binding>
229 <command>dialog-apply</command>
230 </binding>
231 </checkbox>
232
233 <checkbox>
234 <halign>left</halign>
235 <row>3</row>
236 <col>0</col>
237 <label>JBD 1</label>
238 <property>/controls/truman/jbd[0]/state</property>
239 <binding>
240 <command>dialog-apply</command>
241 </binding>
242 </checkbox>
243
244 <checkbox>
245 <halign>left</halign>
246 <row>3</row>
247 <col>1</col>
248 <label>JBD 2</label>
249 <property>/controls/truman/jbd[1]/state</property>
250 <binding>
251 <command>dialog-apply</command>
252 </binding>
253 </checkbox>
254
255 <checkbox>
256 <halign>left</halign>
257 <row>3</row>
258 <col>2</col>
259 <label>JBD 3</label>
260 <property>/controls/truman/jbd[2]/state</property>
261 <binding>
262 <command>dialog-apply</command>
263 </binding>
264 </checkbox>
265
266 <checkbox>
267 <halign>left</halign>
268 <row>3</row>
269 <col>3</col>
270 <label>JBD 4</label>
271 <property>/controls/truman/jbd[3]/state</property>
272 <binding>
273 <command>dialog-apply</command>
274 </binding>
275 </checkbox>
276
277 </group>
278
279
280 <hrule/>
281
282 <group>
283 <layout>table</layout>
284
285 <text>
286 <label>Options</label>
287 <row>0</row>
288 <col>0</col>
289 </text>
290
291 <checkbox>
292 <halign>left</halign>
293 <row>1</row>
294 <col>0</col>
295 <label>Enable Deck Park</label>
296 <property>/controls/truman/deck-park</property>
297 <binding>
298 <command>dialog-apply</command>
299 </binding>
300 </checkbox>
301
302 <checkbox>
303 <halign>left</halign>
304 <row>1</row>
305 <col>1</col>
306 <label>Enable Crew</label>
307 <property>/controls/truman/crew</property>
308 <binding>
309 <command>dialog-apply</command>
310 </binding>
311 </checkbox>
312
313 <checkbox>
314 <halign>left</halign>
315 <row>2</row>
316 <col>0</col>
317 <label>Deck lights</label>
318 <property>/controls/truman/lights</property>
319 <binding>
320 <command>dialog-apply</command>
321 </binding>
322 </checkbox>
323
324 <checkbox>
325 <halign>left</halign>
326 <row>2</row>
327 <col>1</col>
328 <label>Enable Wave motion</label>
329 <property>/controls/truman/wave-motion</property>
330 <binding>
331 <command>dialog-apply</command>
332 </binding>
333 </checkbox>
334
335 </group>
336
337 <empty>
338 <stretch>1</stretch>
339 </empty>
340
341
342
343
344
345 <hrule/>
346
347
348
349 <hrule/>
350
351 <group>
352 <layout>hbox</layout>
353 <default-padding>6</default-padding>
354 <empty>
355 <stretch>true</stretch>
356 </empty>
357
358 <button>
359 <legend>OK</legend>
360 <default>true</default>
361 <equal>true</equal>
362 <binding>
363 <command>dialog-apply</command>
364 </binding>
365 <binding>
366 <command>dialog-close</command>
367 </binding>
368 </button>
369
370 <button>
371 <legend>Apply</legend>
372 <equal>true</equal>
373 <binding>
374 <command>dialog-apply</command>
375 </binding>
376 </button>
377
378 <button>
379 <legend>Reset</legend>
380 <equal>true</equal>
381 <binding>
382 <command>dialog-update</command>
383 </binding>
384 </button>
385
386 <button>
387 <legend>Cancel</legend>
388 <equal>true</equal>
389 <key>Esc</key>
390 <binding>
391 <command>dialog-close</command>
392 </binding>
393 </button>
394
395 <empty>
396 <stretch>true</stretch>
397 </empty>
398 </group>
399 </PropertyList>