Debian Codegraph @

gui/dialogs/devel-extensions.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4 <name>devel-extensions</name>
5 <modal>false</modal>
6 <layout>vbox</layout>
7 <default-padding>5</default-padding>
8
9 <nasal>
10 <open>
11 <![CDATA[
12 var osg_debug = [
13 [0, "- Off"],
14 [1, "- Show Frame Rate"],
15 [2, "+ Viewer Graph"],
16 [3, "+ Camera"],
17 [4, "+ Viewer Scene"],
18 ];
19 var osg_stats = cmdarg().getChildren("group")[1].getChildren("group")[0].getChildren("combo")[0];
20 var i = 0;
21
22 foreach (var s; osg_debug) {
23 var nm = s[0] ~ " " ~ s[1];
24 # print("setting node to ", nm);
25 osg_stats.getNode("value[" ~ i ~ "]", 1).setValue(nm);
26 if (i == getprop("/sim/rendering/on-screen-statistics")) {
27 setprop("/sim/gui/dialogs/devel-extensions/on-screen-statistics", nm);
28 }
29 i += 1;
30 }
31
32 var updateOSG_stats = func(n) {
33 var sel_mode = n.getValue();
34 if (sel_mode == nil) {
35 return;
36 }
37 print("\nupdate OSG debug ", sel_mode);
38
39 foreach (var s; osg_debug) {
40 if (s[0] == sel_mode) {
41 print(" >> ", s[1]);
42 setprop("/sim/gui/dialogs/devel-extensions/on-screen-statistics", s[0] ~ " " ~ s[1]);
43 gui.dialog_update("devel-extensions", "OSGdebug");
44 break;
45 }
46 }
47 # print("OSG Debug ", getprop("/sim/gui/dialogs/devel-extensions/on-screen-statistics"));
48 };
49
50 # listen for results arriving
51 setlistener("/sim/rendering/on-screen-statistics", updateOSG_stats);
52 ]]>
53 </open>
54
55 <close>
56 </close>
57 </nasal>
58
59 <!--new debug dialog
60
61 multiplayer debug checkboxes
62 loopback
63 log outgoing properties 2
64 dump & 4
65 trace incoming properties.
66
67 log level / systems.
68
69 osg debug (0,1,2,3,4)
70
71 reload shaders.-->
72
73 <!-- Title bar with close button -->
74 <group>
75 <layout>hbox</layout>
76 <default-padding>1</default-padding>
77
78 <text>
79 <label>Configure Development Extensions</label>
80 </text>
81
82 <empty>
83 <stretch>true</stretch>
84 </empty>
85
86 <button>
87 <legend>X</legend>
88 <key>Esc</key>
89 <pref-width>20</pref-width>
90 <pref-height>20</pref-height>
91 <binding>
92 <command>dialog-close</command>
93 </binding>
94 </button>
95 </group>
96
97 <hrule/>
98
99 <group>
100 <layout>vbox</layout>
101 <halign>left</halign>
102
103 <checkbox>
104 <halign>left</halign>
105 <label>Enable development dialog widgets (HUD and rendering dialog)</label>
106 <property>/sim/gui/devel-widgets</property>
107 <binding>
108 <command>dialog-apply</command>
109 </binding>
110 </checkbox>
111
112 <checkbox>
113 <halign>left</halign>
114 <label>Enable '/'-key property handler (see $FG_ROOT/Nasal/prop_key_handler.nas)</label>
115 <property>/sim/input/property-key-handler</property>
116 <binding>
117 <command>dialog-apply</command>
118 </binding>
119 </checkbox>
120
121 <!--muultiplayer debug checkboxes
122 loopback
123 log outgoing properties 2
124 dump & 4
125 trace incoming properties.-->
126 <halign>left</halign>
127 <checkbox>
128 <halign>left</halign>
129 <label>Local loopback of model</label>
130 <property>/sim/gui/debug/multiplayer-loopback</property>
131 <binding>
132 <command>dialog-apply</command>
133 </binding>
134 <binding>
135 <command>nasal</command>
136 <script>
137 <![CDATA[
138 setprop("/sim/multiplay/debug-level", (getprop("/sim/multiplay/debug-level") or 0) ^ 1);
139 setprop("/sim/gui/debug/multiplayer-loopback", getprop("/sim/multiplay/debug-level") & 1);
140 ]]>
141 </script>
142 </binding>
143 </checkbox>
144
145 <group>
146 <layout>table</layout>
147 <halign>left</halign>
148
149 <text>
150 <row>0</row>
151 <col>0</col>
152 <label>OSG statistics</label>
153 <halign>right</halign>
154 </text>
155 <combo>
156 <row>0</row>
157 <col>1</col>
158 <pref-width>300</pref-width>
159 <halign>left</halign>
160 <name>OSGdebug</name>
161 <property>/sim/gui/dialogs/devel-extensions/on-screen-statistics</property>
162 <editable>false</editable>
163 <binding>
164 <command>dialog-apply</command>
165 </binding>
166 <binding>
167 <command>nasal</command>
168 <script>
169 <![CDATA[
170 print("OSG Debug ", getprop("/sim/gui/dialogs/devel-extensions/on-screen-statistics"));
171 var selval = substr(getprop("/sim/gui/dialogs/devel-extensions/on-screen-statistics"), 0, 1);
172 print("Set osg debug ", selval);
173 setprop("/sim/rendering/on-screen-statistics", selval);
174 ]]>
175 </script>
176 </binding>
177 </combo>
178
179 <text>
180 <row>1</row>
181 <col>0</col>
182 <label>OSG log level</label>
183 <halign>right</halign>
184 </text>
185 <combo>
186 <row>1</row>
187 <col>1</col>
188 <pref-width>300</pref-width>
189 <halign>left</halign>
190 <name>OSGLog</name>
191 <property>/sim/rendering/osg-notify-level</property>
192 <value>DEBUG_FP</value>
193 <value>DEBUG_INFO</value>
194 <value>INFO</value>
195 <value>NOTICE</value>
196 <value>WARN</value>
197 <value>FATAL</value>
198 <editable>false</editable>
199 <binding>
200 <command>dialog-apply</command>
201 <object-name>OSGLog</object-name>
202 </binding>
203 </combo>
204
205 <text>
206 <row>2</row>
207 <col>0</col>
208 <label>FG log level</label>
209 <halign>right</halign>
210 </text>
211 <combo>
212 <row>2</row>
213 <col>1</col>
214 <pref-width>300</pref-width>
215 <halign>left</halign>
216 <name>SGLogging</name>
217 <property>/sim/logging/priority</property>
218 <value>alert</value>
219 <value>warn</value>
220 <value>info</value>
221 <value>debug</value>
222 <value>bulk</value>
223 <editable>false</editable>
224 <binding>
225 <command>dialog-apply</command>
226 <object-name>SGLogging</object-name>
227 </binding>
228 </combo>
229 </group>
230 </group>
231
232 <group>
233 <layout>table</layout>
234 <halign>left</halign>
235
236 <button>
237 <row>0</row>
238 <col>0</col>
239 <halign>fill</halign>
240 <legend>New Canvas Map</legend>
241 <binding>
242 <command>nasal</command>
243 <script>canvas.MapStructure_selfTest();</script>
244 </binding>
245 </button>
246 <button>
247 <row>0</row>
248 <col>1</col>
249 <halign>fill</halign>
250 <legend>Canvas widgets factory</legend>
251 <binding>
252 <command>nasal</command>
253 <script>globals.widgets_factory_dialog_instance = canvas.WidgetsFactoryDialog.new();</script>
254 </binding>
255 </button>
256 <button>
257 <row>0</row>
258 <col>2</col>
259 <halign>fill</halign>
260 <legend>Canvas property tree browser</legend>
261 <binding>
262 <command>nasal</command>
263 <script>globals.propertyTreeBrowserInstance = canvas.PropertyTreeBrowser.new();</script>
264 </binding>
265 </button>
266 <button>
267 <row>1</row>
268 <col>0</col>
269 <halign>fill</halign>
270 <legend>Reload Nasal canvas module</legend>
271 <binding>
272 <command>nasal-reload</command>
273 <module>canvas</module>
274 </binding>
275 </button>
276 </group>
277
278 <group>
279 <layout>table</layout>
280 <halign>left</halign>
281
282 <button>
283 <row>0</row>
284 <col>0</col>
285 <halign>fill</halign>
286 <legend>Reload GUI</legend>
287 <name>reload-gui</name>
288 <binding>
289 <command>reinit</command>
290 <subsystem>gui</subsystem>
291 </binding>
292 </button>
293
294 <button>
295 <row>0</row>
296 <col>1</col>
297 <halign>fill</halign>
298 <name>reload-input</name>
299 <legend>Reload Input</legend>
300 <binding>
301 <command>reinit</command>
302 <subsystem>input</subsystem>
303 </binding>
304 </button>
305
306 <button>
307 <row>0</row>
308 <col>2</col>
309 <halign>fill</halign>
310 <name>reload-hud</name>
311 <legend>Reload Hud</legend>
312 <binding>
313 <command>reinit</command>
314 <subsystem>hud</subsystem>
315 </binding>
316 </button>
317
318 <button>
319 <row>0</row>
320 <col>3</col>
321 <halign>fill</halign>
322 <name>reload-panel</name>
323 <legend>Reload Panel</legend>
324 <binding>
325 <command>panel-load</command>
326 </binding>
327 </button>
328
329 <button>
330 <row>1</row>
331 <col>0</col>
332 <halign>fill</halign>
333 <name>reload-autopilot</name>
334 <legend>Reload Autopilot</legend>
335 <binding>
336 <command>reinit</command>
337 <subsystem>xml-autopilot</subsystem>
338 </binding>
339 </button>
340
341 <button>
342 <row>1</row>
343 <col>1</col>
344 <halign>fill</halign>
345 <name>reload-network</name>
346 <legend>Reload Network</legend>
347 <binding>
348 <command>reinit</command>
349 <subsystem>io</subsystem>
350 </binding>
351 </button>
352
353 <button>
354 <row>1</row>
355 <col>2</col>
356 <halign>fill</halign>
357 <name>reload-model</name>
358 <legend>Reload Aircraft Model</legend>
359 <binding>
360 <command>reinit</command>
361 <subsystem>aircraft-model</subsystem>
362 </binding>
363 </button>
364
365 <button>
366 <row>1</row>
367 <col>3</col>
368 <halign>fill</halign>
369 <name>reload-shaders</name>
370 <legend>Reload Shaders</legend>
371 <binding>
372 <command>reload-shaders</command>
373 </binding>
374 </button>
375
376 <button>
377 <row>2</row>
378 <col>0</col>
379 <halign>fill</halign>
380 <name>reload-materials</name>
381 <legend>Reload Materials</legend>
382 <binding>
383 <command>reload-materials</command>
384 </binding>
385 </button>
386
387 <button>
388 <row>2</row>
389 <col>1</col>
390 <halign>fill</halign>
391 <name>reload-scenery</name>
392 <legend>Reload Scenery</legend>
393 <binding>
394 <command>reinit</command>
395 <subsystem>scenery</subsystem>
396 </binding>
397 </button>
398
399 <button>
400 <row>2</row>
401 <col>2</col>
402 <halign>fill</halign>
403 <name>reload-compositor</name>
404 <legend>Reload Compositor</legend>
405 <binding>
406 <command>reload-compositor</command>
407 </binding>
408 </button>
409 </group>
410
411 <button>
412 <legend>Close</legend>
413 <default>true</default>
414 <key>Esc</key>
415 <binding>
416 <command>dialog-apply</command>
417 </binding>
418 <binding>
419 <command>dialog-close</command>
420 </binding>
421 </button>
422 </PropertyList>