Debian Codegraph @

gui/dialogs/nimitz.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4 <name>Nimitz</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 Nimitz 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/nimitz/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/nimitz/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() == "Nimitz")
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/nimitz/turn-to-base-course", 0);
69 setprop("/controls/nimitz/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/nimitz/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/nimitz/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() == "Nimitz")
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
98 setprop("/controls/nimitz/turn-to-base-course", 0);
99 setprop("/controls/nimitz/turn-to-launch-hdg", 0);
100 </script>
101 </binding>
102 </radio>
103
104 <radio>
105 <row>3</row>
106 <col>0</col>
107 <halign>left</halign>
108 <label>Turn to base course</label>
109 <property>/controls/nimitz/turn-to-base-course</property>
110 <live>true</live>
111 <binding>
112 <command>dialog-apply</command>
113 </binding>
114 <binding>
115 <command>nasal</command>
116 <script>
117 var v = getprop("/controls/nimitz/turn-to-base-course");
118 foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
119
120 if (c.getNode("name").getValue() != nil and c.getNode("name").getValue() == "Nimitz")
121 {
122 c.getNode("controls/turn-to-base-course").setBoolValue(v);
123 c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0);
124 c.getNode("controls/turn-to-launch-hdg").setBoolValue(0);
125 }
126 }
127
128 setprop("/controls/nimitz/turn-to-launch-hdg", 0);
129 setprop("/controls/nimitz/turn-to-recovery-hdg", 0);
130 </script>
131 </binding>
132 </radio>
133 </group>
134
135 <hrule/>
136
137 <group>
138 <layout>table</layout>
139
140 <text>
141 <label>Equipment</label>
142 <row>0</row>
143 <col>0</col>
144 </text>
145
146 <checkbox>
147 <halign>left</halign>
148 <row>1</row>
149 <col>0</col>
150 <label>Elevator 1</label>
151 <property>/controls/nimitz/elevator[0]/state</property>
152 <binding>
153 <command>dialog-apply</command>
154 </binding>
155 </checkbox>
156
157 <checkbox>
158 <halign>left</halign>
159 <row>1</row>
160 <col>1</col>
161 <label>Elevator 2</label>
162 <property>/controls/nimitz/elevator[1]/state</property>
163 <binding>
164 <command>dialog-apply</command>
165 </binding>
166 </checkbox>
167
168 <checkbox>
169 <halign>left</halign>
170 <row>3</row>
171 <col>0</col>
172 <label>JBD 1</label>
173 <property>/controls/nimitz/jbd[0]/state</property>
174 <binding>
175 <command>dialog-apply</command>
176 </binding>
177 </checkbox>
178
179 <checkbox>
180 <halign>left</halign>
181 <row>3</row>
182 <col>1</col>
183 <label>JBD 2</label>
184 <property>/controls/nimitz/jbd[1]/state</property>
185 <binding>
186 <command>dialog-apply</command>
187 </binding>
188 </checkbox>
189
190 <checkbox>
191 <halign>left</halign>
192 <row>3</row>
193 <col>2</col>
194 <label>JBD 3</label>
195 <property>/controls/nimitz/jbd[2]/state</property>
196 <binding>
197 <command>dialog-apply</command>
198 </binding>
199 </checkbox>
200
201 <checkbox>
202 <halign>left</halign>
203 <row>3</row>
204 <col>3</col>
205 <label>JBD 4</label>
206 <property>/controls/nimitz/jbd[3]/state</property>
207 <binding>
208 <command>dialog-apply</command>
209 </binding>
210 </checkbox>
211
212
213 </group>
214
215
216 <hrule/>
217
218 <group>
219 <layout>table</layout>
220
221 <text>
222 <label>Options</label>
223 <row>0</row>
224 <col>0</col>
225 </text>
226
227 <!--<checkbox>
228 <halign>left</halign>
229 <row>1</row>
230 <col>0</col>
231 <label>Enable Deck Park</label>
232 <property>/controls/nimitz/deck-park</property>
233 <binding>
234 <command>dialog-apply</command>
235 </binding>
236 </checkbox>-->
237
238 <checkbox>
239 <halign>left</halign>
240 <row>1</row>
241 <col>0</col>
242 <label>Enable Crew</label>
243 <property>/controls/nimitz/crew</property>
244 <binding>
245 <command>dialog-apply</command>
246 </binding>
247 </checkbox>
248
249 <checkbox>
250 <halign>left</halign>
251 <row>1</row>
252 <col>1</col>
253 <label>Deck lights</label>
254 <property>/controls/nimitz/lights</property>
255 <binding>
256 <command>dialog-apply</command>
257 </binding>
258 </checkbox>
259
260 <!--<checkbox>
261 <halign>left</halign>
262 <row>2</row>
263 <col>1</col>
264 <label>Enable Wave motion</label>
265 <property>/controls/vinson/wave-motion</property>
266 <binding>
267 <command>dialog-apply</command>
268 </binding>
269 </checkbox>-->
270
271 </group>
272
273 <empty>
274 <stretch>1</stretch>
275 </empty>
276
277
278
279
280
281 <hrule/>
282
283
284
285 <hrule/>
286
287 <group>
288 <layout>hbox</layout>
289 <default-padding>6</default-padding>
290 <empty>
291 <stretch>true</stretch>
292 </empty>
293
294 <button>
295 <legend>OK</legend>
296 <default>true</default>
297 <equal>true</equal>
298 <binding>
299 <command>dialog-apply</command>
300 </binding>
301 <binding>
302 <command>dialog-close</command>
303 </binding>
304 </button>
305
306 <button>
307 <legend>Apply</legend>
308 <equal>true</equal>
309 <binding>
310 <command>dialog-apply</command>
311 </binding>
312 </button>
313
314 <button>
315 <legend>Reset</legend>
316 <equal>true</equal>
317 <binding>
318 <command>dialog-update</command>
319 </binding>
320 </button>
321
322 <button>
323 <legend>Cancel</legend>
324 <equal>true</equal>
325 <key>Esc</key>
326 <binding>
327 <command>dialog-close</command>
328 </binding>
329 </button>
330
331 <empty>
332 <stretch>true</stretch>
333 </empty>
334 </group>
335 </PropertyList>