Debian Codegraph @

gui/dialogs/static-lod.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4 <nasal>
5 <open>
6 <![CDATA[
7
8 var reload_props = [
9 "/sim/rendering/static-lod/vegetation-lod-level",
10 "/sim/rendering/static-lod/line-features-lod-level",
11 "/sim/rendering/static-lod/lod-level[0]/line-features-min-width",
12 "/sim/rendering/static-lod/lod-level[1]/line-features-min-width",
13 "/sim/rendering/static-lod/lod-level[2]/line-features-min-width",
14 "/sim/rendering/static-lod/lod-level[3]/line-features-min-width",
15 "/sim/rendering/static-lod/lod-level[4]/line-features-min-width",
16 "/sim/rendering/static-lod/lod-level[5]/line-features-min-width",
17 "/sim/rendering/static-lod/lod-level[6]/line-features-min-width",
18 "/sim/rendering/static-lod/rough-delta",
19 "/sim/rendering/static-lod/bare-delta"];
20
21 var reload_vals = {};
22 foreach (var p; reload_props) {
23 reload_vals[p] = getprop(p);
24 }
25 check_for_reload = func{
26 var reinit = 0;
27 foreach (var p; reload_props) {
28 if (reload_vals[p] != getprop(p)) {
29 reinit = 1;
30 }
31 }
32
33 if (reinit) {
34 fgcommand("reinit", props.Node.new({"subsystem": "scenery"}));
35 }
36 };
37
38 var lodDIALOG = cmdarg();
39 var dlgLOD = props.Node.new({"dialog-name": "static-lod"});
40
41 var ai_mp_bare = gui.findElementByName(lodDIALOG, "aimp-bare");
42 var ai_mp_bare_label = gui.findElementByName(lodDIALOG, "aimp-bare-label");
43 var ai_mp_detailed = gui.findElementByName(lodDIALOG, "aimp-detailed");
44 var ai_mp_detailed_label = gui.findElementByName(lodDIALOG, "aimp-detailed-label");
45 var current_detailed = nil;
46 var current_bare = nil;
47 var current_ai_mp_mode = "";
48
49 if (getprop("/sim/rendering/static-lod/aimp-detailed") < 0)
50 setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "High Detail only");
51 else if (getprop("/sim/rendering/static-lod/aimp-detailed") == getprop("/sim/rendering/static-lod/aimp-bare"))
52 setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "Low Detail only");
53 else
54 setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "Specify Ranges");
55
56 update_enabling = func{
57 var mode = getprop("/sim/gui/dialogs/static-lod/aimp-mp-mode");
58 if (mode == "Low Detail only") {
59 setprop("/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled", 1);
60 setprop("/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled", 0);
61 } else if (mode == "High Detail only") {
62 setprop("/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled", 0);
63 setprop("/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled", 0);
64 } else {
65 setprop("/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled", 1);
66 setprop("/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled", 1);
67 }
68
69 # if (!getprop("/sim/rendering/static-lod/aimp-bare") and !getprop("/sim/rendering/static-lod/aimp-detailed")) {
70 # setprop("/sim/rendering/static-lod/aimp-bare", 0);
71 # setprop("/sim/rendering/static-lod/aimp-detailed",100);
72 # }
73 return mode;
74 };
75
76 reload_sliders = func(reload) {
77 if (!reload)
78 return ;
79 var current_dialog = getprop("/sim/gui/dialogs/current-dialog");
80 fgcommand("dialog-close", dlgLOD);
81 fgcommand("dialog-show", dlgLOD);
82 if (current_dialog != "") {
83 var show_node = props.Node.new({"dialog-name": current_dialog});
84 fgcommand("dialog-show", show_node);
85 }
86 }
87 ;
88
89 update_scenery_text = func{
90 var detailed = getprop("/sim/rendering/static-lod/detailed");
91 var bare = getprop("/sim/rendering/static-lod/bare-delta");
92 var rough = getprop("/sim/rendering/static-lod/rough-delta");
93 setprop("/sim/rendering/static-lod/detailed-description", sprintf("from %5.0fm to %5.0fm",0, detailed));
94 setprop("/sim/rendering/static-lod/rough-delta-description", sprintf("from %5.0fm to %5.0fm",detailed, rough+detailed));
95 setprop("/sim/rendering/static-lod/bare-delta-description", sprintf("from %5.0fm to %5.0fm",rough+detailed,rough+bare+detailed));
96 };
97
98 update_description = func(mode){
99
100 var descD = "";
101 var descB = "";
102 var descW = "";
103
104 if (getprop("sim/rendering/static-lod/aimp-range-mode-distance")) {
105 if (mode == "Low Detail only") {
106 if (getprop("/sim/rendering/static-lod/aimp-bare")>0) {
107 descD = sprintf("visible when viewpoint within\n%.0f meters", getprop("/sim/rendering/static-lod/aimp-detailed"));
108 } else {
109 descB = "always visible";
110 }
111 } else if (mode == "High Detail only") {
112 descW = "Always visible regardless of distance";
113 } else {
114 descW = "";
115 descD = sprintf("0 to %.0fm from viewpoint", getprop("/sim/rendering/static-lod/aimp-detailed"));
116 descB = sprintf("%.0fm to %.0fm", getprop("/sim/rendering/static-lod/aimp-detailed"), getprop("/sim/rendering/static-lod/aimp-detailed")+getprop("/sim/rendering/static-lod/aimp-bare"));
117 var lowDetailRange = getprop("/sim/rendering/static-lod/aimp-detailed") + getprop("/sim/rendering/static-lod/aimp-bare") ;
118 if (lowDetailRange < 1000)
119 descW = sprintf("WARNING: Low Detail too close, nothing drawn over %.0fm", lowDetailRange);
120
121 }
122 } else {
123 if (mode == "Low Detail only") {
124 if (getprop("/sim/rendering/static-lod/aimp-bare")>0) {
125 descD = sprintf("visible when larger than\n%.0f pixels in size on screen", getprop("/sim/rendering/static-lod/aimp-detailed"));
126 descB = "";
127 descW = sprintf("WARNING: When smaller than %.0f pixels nothing will be drawn", getprop("/sim/rendering/static-lod/aimp-bare"));
128 } else {
129 descW = "";
130 descD = "";
131 descB = "always visible";
132 }
133 } else if (mode == "High Detail only") {
134 descW = "Always visible regardless of distance";
135 } else {
136 descW = "";
137 if (getprop("/sim/rendering/static-lod/aimp-bare")>0)
138 descW = sprintf("WARNING: Below %.0f pixels in size nothing will be drawn", getprop("/sim/rendering/static-lod/aimp-bare"));
139 descD = sprintf("above %.0f pixels in size", getprop("/sim/rendering/static-lod/aimp-detailed"));
140 descB = sprintf("above %.0f pixels in size", getprop("/sim/rendering/static-lod/aimp-bare"));
141 }
142 }
143 setprop("/sim/gui/dialogs/static-lod/aimp-detailed-description", descD);
144 setprop("/sim/gui/dialogs/static-lod/aimp-bare-description", descB);
145 setprop("/sim/gui/dialogs/static-lod/aimp-bare-description1", descW);
146
147 };
148 # returns non zero if the value was adjusted and it can be adjusted (can_reload)
149 adjustValue = func(id, nodeId, value, can_reload){
150 var node = nodeId.getNode(id);
151 if (node != nil) {
152 var cv = node.getValue();
153 if (cv != value) {
154 node.setValue(value);
155 if (can_reload)
156 reload_sliders(1);
157 }
158 }
159 return 0; # no need to reload.
160 }
161
162 update_ai_mp = func(can_reload) {
163 var mode = update_enabling ();
164 var distance_mode = getprop("sim/rendering/static-lod/aimp-range-mode-distance");
165 update_description(mode);
166 if (mode == "Low Detail only") {
167 setprop("/sim/rendering/static-lod/aimp-detailed",getprop("/sim/rendering/static-lod/aimp-bare"));
168 can_reload = adjustValue("max", ai_mp_bare, 2000, can_reload);
169 reload_sliders(can_reload);
170 } else if (mode == "High Detail only") {
171 # setprop("/sim/rendering/static-lod/aimp-bare", 0);
172 # setprop("/sim/rendering/static-lod/aimp-detailed",-1);
173 } else {
174 if (!distance_mode) {
175 if (getprop("/sim/rendering/static-lod/aimp-bare") > getprop("/sim/rendering/static-lod/aimp-detailed")){
176 setprop("/sim/rendering/static-lod/aimp-bare", getprop("/sim/rendering/static-lod/aimp-detailed")-1 ) ;
177 }
178 can_reload = adjustValue("max", ai_mp_detailed, 2000, can_reload);
179 can_reload = adjustValue("max", ai_mp_bare, getprop("/sim/rendering/static-lod/aimp-detailed"), can_reload);
180 } else {
181 can_reload = adjustValue("max", ai_mp_detailed, 3000, can_reload);
182 can_reload = adjustValue("max", ai_mp_bare, 3000, can_reload);
183 }
184 }
185 }
186 update_aimp_mode = func{
187 var new_mode = getprop("/sim/gui/dialogs/static-lod/aimp-mp-mode");
188 if (new_mode != current_ai_mp_mode) {
189
190 if (current_ai_mp_mode == "Specify Ranges") {
191 current_detailed = getprop("/sim/rendering/static-lod/aimp-detailed");
192 current_bare =getprop("/sim/rendering/static-lod/aimp-bare");
193 }
194 if (current_ai_mp_mode == "Low Detail only" or current_ai_mp_mode == "High Detail only") {
195 if (current_detailed != nil)
196 setprop("/sim/rendering/static-lod/aimp-detailed", current_detailed );
197 if (current_bare != nil)
198 setprop("/sim/rendering/static-lod/aimp-bare",current_bare);
199 }
200 if (new_mode == "High Detail only") {
201 setprop("/sim/rendering/static-lod/aimp-detailed", -1);
202 setprop("/sim/rendering/static-lod/aimp-bare",0);
203 } else if (new_mode == "Low Detail only"){
204 setprop("/sim/rendering/static-lod/aimp-detailed", 0);
205 setprop("/sim/rendering/static-lod/aimp-bare",0);
206 }
207 current_ai_mp_mode = new_mode;
208 }
209 update_description(update_enabling());
210 }
211 # setlistener("/sim/gui/dialogs/static-lod/aimp-mp-mode", func(v){
212 # },0 ,0);
213
214 update_scenery_text ();
215 update_ai_mp (0);
216
217
218 ]]>
219 </open>
220 </nasal>
221
222 <name>static-lod</name>
223 <layout>vbox</layout>
224
225 <group>
226 <layout>hbox</layout>
227
228 <text>
229 <label>Adjust Level Of Detail Ranges</label>
230 </text>
231
232 <empty>
233 <stretch>1</stretch>
234 </empty>
235
236 <button>
237 <legend>X</legend>
238 <key>Esc</key>
239 <pref-width>20</pref-width>
240 <pref-height>20</pref-height>
241 <binding>
242 <command>dialog-close</command>
243 </binding>
244 </button>
245 </group>
246
247 <hrule/>
248
249 <group>
250 <layout>table</layout>
251 <halign>center</halign>
252
253
254 <text>
255 <row>0</row>
256 <col>1</col>
257 <halign>center</halign>
258 <label>Scenery (Tiles, Buildings, Roads, Railways)</label>
259 </text>
260
261 <text>
262 <row>1</row>
263 <col>0</col>
264 <label>Detailed</label>
265 </text>
266 <slider>
267 <row>1</row>
268 <col>1</col>
269 <pref-width>300</pref-width>
270 <pref-height>14</pref-height>
271 <name>scenery-detailed</name>
272 <property>/sim/rendering/static-lod/detailed</property>
273 <live>1</live>
274 <min>0</min>
275 <max>100000</max>
276 <binding>
277 <command>dialog-apply</command>
278 <object-name>scenery-detailed</object-name>
279 </binding>
280 <binding>
281 <command>nasal</command>
282 <script>
283 <![CDATA[
284 update_scenery_text();
285 ]]>
286 </script>
287 </binding>
288 </slider>
289
290 <text>
291 <row>1</row>
292 <col>2</col>
293 <halign>left</halign>
294 <label>xxxxxxxxxxxxxxxxxxx</label>
295 <live>true</live>
296 <property>/sim/rendering/static-lod/detailed-description</property>
297 </text>
298
299 <!--ROUGH -->
300 <text>
301 <row>2</row>
302 <col>0</col>
303 <label>Rough</label>
304 </text>
305 <slider>
306 <row>2</row>
307 <col>1</col>
308 <pref-width>300</pref-width>
309 <pref-height>14</pref-height>
310 <name>scenery-rough</name>
311 <property>/sim/rendering/static-lod/rough-delta</property>
312 <live>1</live>
313 <min>0</min>
314 <max>200000</max>
315 <binding>
316 <command>dialog-apply</command>
317 <object-name>scenery-rough</object-name>
318 </binding>
319 <binding>
320 <command>nasal</command>
321 <script>
322 <![CDATA[
323 update_scenery_text();
324 ]]>
325 </script>
326 </binding>
327 </slider>
328
329 <text>
330 <row>2</row>
331 <col>2</col>
332 <halign>left</halign>
333 <label>xxxxxxxxxxxxxx</label>
334 <live>true</live>
335 <property>/sim/rendering/static-lod/rough-delta-description</property>
336 </text>
337
338 <!--BARE -->
339 <text>
340 <row>3</row>
341 <col>0</col>
342 <label>Bare</label>
343 </text>
344 <slider>
345 <row>3</row>
346 <col>1</col>
347 <pref-width>300</pref-width>
348 <pref-height>14</pref-height>
349 <name>scenery-bare</name>
350 <property>/sim/rendering/static-lod/bare-delta</property>
351 <live>1</live>
352 <min>0</min>
353 <max>200000</max>
354 <binding>
355 <command>dialog-apply</command>
356 <object-name>scenery-bare</object-name>
357 </binding>
358 <binding>
359 <command>nasal</command>
360 <script>
361 <![CDATA[
362 update_scenery_text();
363 ]]>
364 </script>
365 </binding>
366 </slider>
367
368 <text>
369 <row>3</row>
370 <col>2</col>
371 <halign>left</halign>
372 <label>xxxxxxxxxxxxxx</label>
373 <live>true</live>
374 <property>/sim/rendering/static-lod/bare-delta-description</property>
375 </text>
376 <!-- end bare -->
377
378 <!--This is the AI/MP part-->
379 <hrule>
380 <row>4</row>
381 <col>0</col>
382 <colspan>7</colspan>
383 </hrule>
384
385 <text>
386 <row>5</row>
387 <col>1</col>
388 <halign>center</halign>
389 <label>AI/MP Aircraft</label>
390 </text>
391 <combo>
392 <row>6</row>
393 <col>1</col>
394 <pref-width>200</pref-width>
395 <name>aimp-mode</name>
396 <property>/sim/gui/dialogs/static-lod/aimp-mp-mode</property>
397 <value>Specify Ranges</value>
398 <value>Low Detail only</value>
399 <value>High Detail only</value>
400 <editable>false</editable>
401 <binding>
402 <command>dialog-apply</command>
403 <object-name>aimp-mode</object-name>
404 </binding>
405 <binding>
406 <command>nasal</command>
407 <script>
408 <![CDATA[
409 update_aimp_mode();
410 ]]>
411 </script>
412 </binding>
413 </combo>
414 <checkbox>
415 <row>6</row>
416 <col>2</col>
417
418 <halign>left</halign>
419 <name>distance</name>
420 <property>sim/rendering/static-lod/aimp-range-mode-distance</property>
421 <live>true</live>
422 <label>AI/MP in meters</label>
423 <binding>
424 <command>property-toggle</command>
425 <property>sim/rendering/static-lod/aimp-range-mode-distance</property>
426 <value>0</value>
427 </binding>
428 <binding>
429 <command>nasal</command>
430 <script>
431 <![CDATA[
432 update_ai_mp(0);
433 ]]>
434 </script>
435 </binding>
436
437 </checkbox>
438
439 <!--ai - detail-->
440 <text>
441 <row>7</row>
442 <col>0</col>
443 <name>aimp-detailed-label</name>
444 <enable><property>/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled</property></enable>
445 <label>High Detail</label>
446 </text>
447 <slider>
448 <row>7</row>
449 <col>1</col>
450 <pref-width>300</pref-width>
451 <pref-height>14</pref-height>
452 <name>aimp-detailed</name>
453 <enable><property>/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled</property></enable>
454 <property>/sim/rendering/static-lod/aimp-detailed</property>
455 <live>1</live>
456 <min>0</min>
457 <max>1500</max>
458 <binding>
459 <command>dialog-apply</command>
460 <object-name>aimp-detailed</object-name>
461 </binding>
462 <binding>
463 <command>nasal</command>
464 <script>
465 <![CDATA[
466 update_ai_mp(1);
467 ]]>
468 </script>
469 </binding>
470 <binding>
471 <command>dialog-update</command>
472 </binding>
473
474 </slider>
475
476 <text>
477 <row>7</row>
478 <col>2</col>
479 <halign>left</halign>
480 <label>xxxxxxxxxxxxxxxxxxxxxxxxxx</label>
481 <live>true</live>
482 <property>/sim/gui/dialogs/static-lod/aimp-detailed-description</property>
483 </text>
484 <!-- end ai detail -->
485
486 <!--ai - bare-->
487 <text>
488 <name>aimp-bare-label</name>
489 <enable><property>/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled</property></enable>
490 <row>8</row>
491 <col>0</col>
492 <label>Low Detail</label>
493 </text>
494 <slider>
495 <row>8</row>
496 <col>1</col>
497 <enable><property>/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled</property></enable>
498 <pref-width>300</pref-width>
499 <pref-height>14</pref-height>
500 <name>aimp-bare</name>
501 <property>/sim/rendering/static-lod/aimp-bare</property>
502 <live>1</live>
503 <min>0</min>
504 <max>1500</max>
505 <binding>
506 <command>dialog-apply</command>
507 <object-name>aimp-bare</object-name>
508 </binding>
509 <binding>
510 <command>nasal</command>
511 <script>
512 <![CDATA[
513 update_ai_mp(1);
514 ]]>
515 </script>
516 </binding>
517 <binding>
518 <command>dialog-update</command>
519 </binding>
520 </slider>
521
522 <text>
523 <row>8</row>
524 <col>2</col>
525 <halign>left</halign>
526 <valign>top</valign>
527 <label>xxxxxxxxxxxxxxxxxxxxxxxxxx</label>
528 <live>true</live>
529 <property>/sim/gui/dialogs/static-lod/aimp-bare-description</property>
530 </text>
531 <text>
532 <row>9</row>
533 <col>1</col>
534 <halign>left</halign>
535 <valign>top</valign>
536 <label>xxxxxxxxxxxxxxxxxxxxxxxxxx</label>
537 <live>true</live>
538 <property>/sim/gui/dialogs/static-lod/aimp-bare-description1</property>
539 </text>
540
541 <text>
542 <row>11</row>
543 <col>0</col>
544 <halign>right</halign>
545 <label>AI/MP Interior</label>
546 </text>
547
548 <slider>
549 <row>11</row>
550 <col>1</col>
551 <pref-width>300</pref-width>
552 <pref-height>14</pref-height>
553 <name>aimp-interior</name>
554 <property>/sim/rendering/static-lod/aimp-interior</property>
555 <live>1</live>
556 <min>0</min>
557 <max>1500</max>
558 <binding>
559 <command>dialog-apply</command>
560 <object-name>aimp-interior</object-name>
561 </binding>
562 <!--<binding>
563 <command>nasal</command>
564 <script>
565 <![CDATA[
566 update_ai_mp(1);
567 ]]>
568 </script>
569 </binding>
570 <binding>
571 <command>dialog-update</command>
572 </binding>-->
573 </slider>
574 <text>
575 <row>11</row>
576 <col>2</col>
577 <halign>left</halign>
578 <valign>top</valign>
579 <label>xxxxxxxxxxxxxxxxxxxxxxxxxx</label>
580 <format>%.0f </format>
581 <live>true</live>
582 <property>/sim/rendering/static-lod/aimp-interior</property>
583 </text>
584 </group>
585
586 <hrule/>
587
588 <group>
589 <layout>hbox</layout>
590 <halign>left</halign>
591 <text>
592 <label>World Scenery 3.0 (Experimental)</label>
593 </text>
594 <hrule>
595 <stretch>true</stretch>
596 </hrule>
597 </group>
598
599 <group>
600 <layout>hbox</layout>
601 <halign>left</halign>
602 <text>
603 <label>WS3.0 uses 7 levels of detail, from 0 (least detailed) to 6 (most detailed).</label>
604 </text>
605 </group>
606
607 <group>
608 <layout>hbox</layout>
609 <halign>left</halign>
610 <text>
611 <label>You can control at which level features are rendered.</label>
612 </text>
613 </group>
614
615 <group>
616 <layout>hbox</layout>
617 <halign>center</halign>
618
619 <group>
620 <layout>table</layout>
621 <default-padding>4</default-padding>
622 <valign>center</valign>
623 <text>
624 <row>0</row>
625 <col>0</col>
626 <enable>
627 <equals>
628 <property>/scenery/use-vpb</property>
629 <value>true</value>
630 </equals>
631 </enable>
632 <label>Detail range</label>
633 </text>
634
635 <text>
636 <row>1</row>
637 <col>0</col>
638 <enable>
639 <equals>
640 <property>/scenery/use-vpb</property>
641 <value>true</value>
642 </equals>
643 </enable>
644 <label>Line Feature minimum LOD</label>
645 </text>
646 <slider>
647 <row>1</row>
648 <col>1</col>
649 <name>line-lod</name>
650 <enable>
651 <equals>
652 <property>/scenery/use-vpb</property>
653 <value>true</value>
654 </equals>
655 </enable>
656 <min>0.0</min>
657 <max>6.0</max>
658 <step>1.0</step>
659 <fraction>0.17</fraction>
660 <property>/sim/rendering/static-lod/line-features-lod-level</property>
661 <binding>
662 <command>dialog-apply</command>
663 <object-name>line-lod</object-name>
664 </binding>
665 </slider>
666 <text>
667 <row>1</row>
668 <col>2</col>
669 <label>1</label>
670 <enable>
671 <equals>
672 <property>/scenery/use-vpb</property>
673 <value>true</value>
674 </equals>
675 </enable>
676 <format>%d</format>
677 <live>true</live>
678 <property>/sim/rendering/static-lod/line-features-lod-level</property>
679 </text>
680
681 <text>
682 <row>2</row>
683 <col>0</col>
684 <enable>
685 <equals>
686 <property>/scenery/use-vpb</property>
687 <value>true</value>
688 </equals>
689 </enable>
690 <label>Vegetation minimum LOD</label>
691 </text>
692 <slider>
693 <row>2</row>
694 <col>1</col>
695 <name>veg-lod</name>
696 <enable>
697 <equals>
698 <property>/scenery/use-vpb</property>
699 <value>true</value>
700 </equals>
701 </enable>
702 <min>0.0</min>
703 <max>6.0</max>
704 <step>1.0</step>
705 <fraction>0.17</fraction>
706 <property>/sim/rendering/static-lod/vegetation-lod-level</property>
707 <binding>
708 <command>dialog-apply</command>
709 <object-name>veg-lod</object-name>
710 </binding>
711 </slider>
712 <text>
713 <row>2</row>
714 <col>2</col>
715 <label>1</label>
716 <enable>
717 <equals>
718 <property>/scenery/use-vpb</property>
719 <value>true</value>
720 </equals>
721 </enable>
722 <format>%d</format>
723 <live>true</live>
724 <property>/sim/rendering/static-lod/vegetation-lod-level</property>
725 </text>
726 </group>
727 </group>
728
729 <hrule/>
730
731 <group>
732 <layout>hbox</layout>
733 <halign>center</halign>
734
735 <group>
736 <layout>table</layout>
737 <default-padding>4</default-padding>
738 <valign>center</valign>
739 <text>
740 <row>0</row>
741 <col>0</col>
742 <label>LOD Level</label>
743 </text>
744 <text>
745 <row>0</row>
746 <col>1</col>
747 <colspan>2</colspan>
748 <label>Minimum Line Feature Width (m)</label>
749 </text>
750 <text>
751 <row>1</row>
752 <col>0</col>
753 <label>0</label>
754 </text>
755 <slider>
756 <row>1</row>
757 <col>1</col>
758 <name>line-width-lod0</name>
759 <enable>
760 <equals>
761 <property>/scenery/use-vpb</property>
762 <value>true</value>
763 </equals>
764 </enable>
765 <min>1.0</min>
766 <max>50.0</max>
767 <step>1.0</step>
768 <fraction>0.17</fraction>
769 <property>/sim/rendering/static-lod/lod-level[0]/line-features-min-width</property>
770 <binding>
771 <command>dialog-apply</command>
772 <object-name>line-width-lod0</object-name>
773 </binding>
774 </slider>
775 <text>
776 <label>12</label>
777 <row>1</row>
778 <col>2</col>
779 <enable>
780 <equals>
781 <property>/scenery/use-vpb</property>
782 <value>true</value>
783 </equals>
784 </enable>
785 <format>%d</format>
786 <live>true</live>
787 <property>/sim/rendering/static-lod/lod-level[0]/line-features-min-width</property>
788 </text>
789
790 <text>
791 <row>2</row>
792 <col>0</col>
793 <label>1</label>
794 </text>
795 <slider>
796 <row>2</row>
797 <col>1</col>
798 <name>line-width-lod1</name>
799 <enable>
800 <equals>
801 <property>/scenery/use-vpb</property>
802 <value>true</value>
803 </equals>
804 </enable>
805 <min>1.0</min>
806 <max>50.0</max>
807 <step>1.0</step>
808 <fraction>0.17</fraction>
809 <property>/sim/rendering/static-lod/lod-level[1]/line-features-min-width</property>
810 <binding>
811 <command>dialog-apply</command>
812 <object-name>line-width-lod1</object-name>
813 </binding>
814 </slider>
815 <text>
816 <label>12</label>
817 <row>2</row>
818 <col>2</col>
819 <enable>
820 <equals>
821 <property>/scenery/use-vpb</property>
822 <value>true</value>
823 </equals>
824 </enable>
825 <format>%d</format>
826 <live>true</live>
827 <property>/sim/rendering/static-lod/lod-level[1]/line-features-min-width</property>
828 </text>
829 <text>
830 <row>3</row>
831 <col>0</col>
832 <label>2</label>
833 </text>
834 <slider>
835 <row>3</row>
836 <col>1</col>
837 <name>line-width-lod2</name>
838 <enable>
839 <equals>
840 <property>/scenery/use-vpb</property>
841 <value>true</value>
842 </equals>
843 </enable>
844 <min>1.0</min>
845 <max>50.0</max>
846 <step>1.0</step>
847 <fraction>0.17</fraction>
848 <property>/sim/rendering/static-lod/lod-level[2]/line-features-min-width</property>
849 <binding>
850 <command>dialog-apply</command>
851 <object-name>line-width-lod2</object-name>
852 </binding>
853 </slider>
854 <text>
855 <label>12</label>
856 <row>3</row>
857 <col>2</col>
858 <enable>
859 <equals>
860 <property>/scenery/use-vpb</property>
861 <value>true</value>
862 </equals>
863 </enable>
864 <format>%d</format>
865 <live>true</live>
866 <property>/sim/rendering/static-lod/lod-level[2]/line-features-min-width</property>
867 </text>
868
869 <text>
870 <row>4</row>
871 <col>0</col>
872 <label>3</label>
873 </text>
874 <slider>
875 <row>4</row>
876 <col>1</col>
877 <name>line-width-lod3</name>
878 <enable>
879 <equals>
880 <property>/scenery/use-vpb</property>
881 <value>true</value>
882 </equals>
883 </enable>
884 <min>1.0</min>
885 <max>50.0</max>
886 <step>1.0</step>
887 <fraction>0.17</fraction>
888 <property>/sim/rendering/static-lod/lod-level[3]/line-features-min-width</property>
889 <binding>
890 <command>dialog-apply</command>
891 <object-name>line-width-lod3</object-name>
892 </binding>
893 </slider>
894 <text>
895 <label>12</label>
896 <row>4</row>
897 <col>2</col>
898 <enable>
899 <equals>
900 <property>/scenery/use-vpb</property>
901 <value>true</value>
902 </equals>
903 </enable>
904 <format>%d</format>
905 <live>true</live>
906 <property>/sim/rendering/static-lod/lod-level[3]/line-features-min-width</property>
907 </text>
908
909 <text>
910 <row>5</row>
911 <col>0</col>
912 <label>4</label>
913 </text>
914 <slider>
915 <row>5</row>
916 <col>1</col>
917 <name>line-width-lod4</name>
918 <enable>
919 <equals>
920 <property>/scenery/use-vpb</property>
921 <value>true</value>
922 </equals>
923 </enable>
924 <min>1.0</min>
925 <max>50.0</max>
926 <step>1.0</step>
927 <fraction>0.17</fraction>
928 <property>/sim/rendering/static-lod/lod-level[4]/line-features-min-width</property>
929 <binding>
930 <command>dialog-apply</command>
931 <object-name>line-width-lod4</object-name>
932 </binding>
933 </slider>
934 <text>
935 <label>12</label>
936 <row>5</row>
937 <col>2</col>
938 <enable>
939 <equals>
940 <property>/scenery/use-vpb</property>
941 <value>true</value>
942 </equals>
943 </enable>
944 <format>%d</format>
945 <live>true</live>
946 <property>/sim/rendering/static-lod/lod-level[4]/line-features-min-width</property>
947 </text>
948
949 <text>
950 <row>6</row>
951 <col>0</col>
952 <label>5</label>
953 </text>
954 <slider>
955 <row>6</row>
956 <col>1</col>
957 <name>line-width-lod5</name>
958 <enable>
959 <equals>
960 <property>/scenery/use-vpb</property>
961 <value>true</value>
962 </equals>
963 </enable>
964 <min>1.0</min>
965 <max>50.0</max>
966 <step>1.0</step>
967 <fraction>0.17</fraction>
968 <property>/sim/rendering/static-lod/lod-level[5]/line-features-min-width</property>
969 <binding>
970 <command>dialog-apply</command>
971 <object-name>line-width-lod5</object-name>
972 </binding>
973 </slider>
974 <text>
975 <label>12</label>
976 <row>6</row>
977 <col>2</col>
978 <enable>
979 <equals>
980 <property>/scenery/use-vpb</property>
981 <value>true</value>
982 </equals>
983 </enable>
984 <format>%d</format>
985 <live>true</live>
986 <property>/sim/rendering/static-lod/lod-level[5]/line-features-min-width</property>
987 </text>
988
989 <text>
990 <row>7</row>
991 <col>0</col>
992 <label>6</label>
993 </text>
994 <slider>
995 <row>7</row>
996 <col>1</col>
997 <name>line-width-lod6</name>
998 <enable>
999 <equals>
1000 <property>/scenery/use-vpb</property>
1001 <value>true</value>
1002 </equals>
1003 </enable>
1004 <min>1.0</min>
1005 <max>50.0</max>
1006 <step>1.0</step>
1007 <fraction>0.17</fraction>
1008 <property>/sim/rendering/static-lod/lod-level[6]/line-features-min-width</property>
1009 <binding>
1010 <command>dialog-apply</command>
1011 <object-name>line-width-lod6</object-name>
1012 </binding>
1013 </slider>
1014 <text>
1015 <label>12</label>
1016 <row>7</row>
1017 <col>2</col>
1018 <enable>
1019 <equals>
1020 <property>/scenery/use-vpb</property>
1021 <value>true</value>
1022 </equals>
1023 </enable>
1024 <format>%d</format>
1025 <live>true</live>
1026 <property>/sim/rendering/static-lod/lod-level[6]/line-features-min-width</property>
1027 </text>
1028 </group>
1029 </group>
1030
1031 <hrule/>
1032
1033 <group>
1034 <layout>hbox</layout>
1035 <default-padding>10</default-padding>
1036 <empty>
1037 <stretch>true</stretch>
1038 </empty>
1039 <button>
1040 <legend>OK</legend>
1041 <default>true</default>
1042 <equal>true</equal>
1043 <binding>
1044 <command>dialog-apply</command>
1045 </binding>
1046 <binding>
1047 <command>nasal</command>
1048 <script>
1049 <![CDATA[
1050 check_for_reload();
1051 ]]>
1052 </script>
1053 </binding>
1054 <binding>
1055 <command>dialog-close</command>
1056 </binding>
1057 </button>
1058 <empty>
1059 <stretch>true</stretch>
1060 </empty>
1061 <button>
1062 <legend>Apply</legend>
1063 <equal>true</equal>
1064 <binding>
1065 <command>dialog-apply</command>
1066 </binding>
1067 <binding>
1068 <command>nasal</command>
1069 <script>
1070 <![CDATA[
1071 check_for_reload();
1072 ]]>
1073 </script>
1074 </binding> </button>
1075 <empty>
1076 <stretch>true</stretch>
1077 </empty>
1078
1079 <button>
1080 <legend>Defaults</legend>
1081 <equal>true</equal>
1082
1083 <!--end reset for pixel mode-->
1084 <binding>
1085 <command>nasal</command>
1086 <script>
1087 <![CDATA[
1088 setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "Specify Ranges");
1089 setprop("/sim/rendering/static-lod/detailed",1500);
1090 setprop("/sim/rendering/static-lod/rough-delta",7500);
1091 setprop("/sim/rendering/static-lod/bare-delta",21000);
1092 if (getprop("sim/rendering/static-lod/aimp-range-mode-distance")){
1093 # Reset for meters
1094 setprop("/sim/rendering/static-lod/aimp-detailed",500);
1095 setprop("/sim/rendering/static-lod/aimp-bare",2000);
1096 setprop("/sim/rendering/static-lod/aimp-interior",50);
1097 } else {
1098 # Reset for pixel mode
1099 setprop("/sim/rendering/static-lod/aimp-detailed",400);
1100 setprop("/sim/rendering/static-lod/aimp-bare",0);
1101 setprop("/sim/rendering/static-lod/aimp-interior",200);
1102 }
1103 update_description(update_enabling());
1104 reload_sliders(1);
1105 ]]>
1106 </script>
1107 </binding>
1108 </button>
1109 <empty>
1110 <stretch>true</stretch>
1111 </empty>
1112 <button>
1113 <legend>Close</legend>
1114 <key>Esc</key>
1115 <binding>
1116 <command>dialog-close</command>
1117 </binding>
1118 </button>
1119 </group>
1120
1121
1122
1123 </PropertyList>