Debian Codegraph @

gui/dialogs/kuznetsov.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4 <name>Kuznetsov</name>
5 <modal>false</modal>
6 <layout>vbox</layout>
7
8 <group>
9 <layout>hbox</layout>
10
11 <text>
12 <label>Admiral Kuznetsov Controls</label>
13 </text>
14
15 <empty>
16 <stretch>1</stretch>
17 </empty>
18
19 <button>
20 <legend>X</legend>
21 <key>Esc</key>
22 <pref-width>20</pref-width>
23 <pref-height>20</pref-height>
24 <binding>
25 <command>dialog-close</command>
26 </binding>
27 </button>
28 </group>
29
30 <hrule/>
31
32 <group>
33 <layout>table</layout>
34
35 <text>
36 <label>Course</label>
37 <row>0</row>
38 <col>0</col>
39 </text>
40
41 <radio>
42 <row>1</row>
43 <col>0</col>
44 <halign>left</halign>
45 <label>Turn to launch course</label>
46 <property>/controls/kuznetsov/turn-to-launch-hdg</property>
47 <live>true</live>
48 <binding>
49 <command>dialog-apply</command>
50 </binding>
51 <binding>
52 <command>nasal</command>
53 <script>
54 var v = getprop("/controls/kuznetsov/turn-to-launch-hdg");
55 foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
56
57 if (c.getNode("name").getValue() != nil and c.getNode("name").getValue() == "Kuznetsov")
58 {
59 c.getNode("controls/turn-to-launch-hdg").setBoolValue(v);
60 c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0);
61 c.getNode("controls/turn-to-base-course").setBoolValue(0);
62 }
63 }
64
65 setprop("/controls/kuznetsov/turn-to-base-course", 0);
66 setprop("/controls/kuznetsov/turn-to-recovery-hdg", 0);
67 </script>
68 </binding>
69 </radio>
70
71 <radio>
72 <row>2</row>
73 <col>0</col>
74 <halign>left</halign>
75 <label>Turn to recovery course</label>
76 <property>/controls/kuznetsov/turn-to-recovery-hdg</property>
77 <live>true</live>
78 <binding>
79 <command>dialog-apply</command>
80 </binding>
81 <binding>
82 <command>nasal</command>
83 <script>
84 var v = getprop("/controls/kuznetsov/turn-to-recovery-hdg");
85 foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
86
87 if (c.getNode("name").getValue() != nil and c.getNode("name").getValue() == "Kuznetsov")
88 {
89 c.getNode("controls/turn-to-recovery-hdg").setBoolValue(v);
90 c.getNode("controls/turn-to-launch-hdg").setBoolValue(0);
91 c.getNode("controls/turn-to-base-course").setBoolValue(0);
92 }
93 }
94
95 setprop("/controls/kuznetsov/turn-to-base-course", 0);
96 setprop("/controls/kuznetsov/turn-to-launch-hdg", 0);
97 </script>
98 </binding>
99 </radio>
100
101 <radio>
102 <row>3</row>
103 <col>0</col>
104 <halign>left</halign>
105 <label>Turn to base course</label>
106 <property>/controls/kuznetsov/turn-to-base-course</property>
107 <live>true</live>
108 <binding>
109 <command>dialog-apply</command>
110 </binding>
111 <binding>
112 <command>nasal</command>
113 <script>
114 var v = getprop("/controls/kuznetsov/turn-to-base-course");
115 foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
116
117 if (c.getNode("name").getValue() != nil and c.getNode("name").getValue() == "Kuznetsov")
118 {
119 c.getNode("controls/turn-to-base-course").setBoolValue(v);
120 c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0);
121 c.getNode("controls/turn-to-launch-hdg").setBoolValue(0);
122 }
123 }
124
125 setprop("/controls/kuznetsov/turn-to-launch-hdg", 0);
126 setprop("/controls/kuznetsov/turn-to-recovery-hdg", 0);
127 </script>
128 </binding>
129 </radio>
130 </group>
131
132 <hrule/>
133
134 <group>
135 <layout>table</layout>
136
137 <text>
138 <label>Equipment</label>
139 <row>0</row>
140 <col>0</col>
141 </text>
142
143 <checkbox>
144 <halign>left</halign>
145 <row>3</row>
146 <col>0</col>
147 <label>JBD 1</label>
148 <property>/controls/kuznetsov/jbd[0]/state</property>
149 <binding>
150 <command>dialog-apply</command>
151 </binding>
152 </checkbox>
153
154 <checkbox>
155 <halign>left</halign>
156 <row>3</row>
157 <col>1</col>
158 <label>JBD 2</label>
159 <property>/controls/kuznetsov/jbd[1]/state</property>
160 <binding>
161 <command>dialog-apply</command>
162 </binding>
163 </checkbox>
164
165 <checkbox>
166 <halign>left</halign>
167 <row>3</row>
168 <col>2</col>
169 <label>JBD 3</label>
170 <property>/controls/kuznetsov/jbd[2]/state</property>
171 <binding>
172 <command>dialog-apply</command>
173 </binding>
174 </checkbox>
175
176 </group>
177
178 <hrule/>
179
180 <empty>
181 <stretch>1</stretch>
182 </empty>
183
184 <hrule/>
185
186
187 <group>
188 <layout>hbox</layout>
189 <default-padding>6</default-padding>
190 <empty>
191 <stretch>true</stretch>
192 </empty>
193
194 <button>
195 <legend>OK</legend>
196 <default>true</default>
197 <equal>true</equal>
198 <binding>
199 <command>dialog-apply</command>
200 </binding>
201 <binding>
202 <command>dialog-close</command>
203 </binding>
204 </button>
205
206 <button>
207 <legend>Apply</legend>
208 <equal>true</equal>
209 <binding>
210 <command>dialog-apply</command>
211 </binding>
212 </button>
213
214 <button>
215 <legend>Reset</legend>
216 <equal>true</equal>
217 <binding>
218 <command>dialog-update</command>
219 </binding>
220 </button>
221
222 <button>
223 <legend>Cancel</legend>
224 <equal>true</equal>
225 <key>Esc</key>
226 <binding>
227 <command>dialog-close</command>
228 </binding>
229 </button>
230
231 <empty>
232 <stretch>true</stretch>
233 </empty>
234 </group>
235 </PropertyList>