diff --git a/defaults.xml b/defaults.xml
index d40f7d2f5..4f1f59aea 100644
--- a/defaults.xml
+++ b/defaults.xml
@@ -160,19 +160,22 @@ Started September 2000 by David Megginson, david@megginson.com
-->
180.0
- 1500
- 9000
- 30000
- false
- 3000
- 10000
- 50
+ 1500
+ 7500
+ 21000
+ false
+ 400
+ 0
+ 200truetrue
@@ -509,6 +512,7 @@ Started September 2000 by David Megginson, david@megginson.com
Huds/default.xmlHuds/NTPS.xmlHuds/minimal.xml
+ Huds/developer.xmlfalse
diff --git a/gui/dialogs/rendering.xml b/gui/dialogs/rendering.xml
index 3dd4ddd12..22beeb2ed 100644
--- a/gui/dialogs/rendering.xml
+++ b/gui/dialogs/rendering.xml
@@ -238,17 +238,6 @@
-
- left
-
- mpmodels
- /sim/multiplay/use-detailed-models
-
- dialog-apply
- mpmodels
-
-
-
1
diff --git a/gui/dialogs/static-lod.xml b/gui/dialogs/static-lod.xml
index 27a9be3c7..9ff5963d8 100644
--- a/gui/dialogs/static-lod.xml
+++ b/gui/dialogs/static-lod.xml
@@ -1,204 +1,582 @@
-
-
-
+
+
-
-
+ if (getprop("/sim/rendering/static-lod/aimp-detailed") < 0)
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "High Detail only");
+ else if (getprop("/sim/rendering/static-lod/aimp-detailed") == getprop("/sim/rendering/static-lod/aimp-bare"))
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "Low Detail only");
+ else
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "Specify Ranges");
- static-lod
- vbox
+ update_enabling = func{
+ var mode = getprop("/sim/gui/dialogs/static-lod/aimp-mp-mode");
+ if (mode == "Low Detail only") {
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled", 1);
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled", 0);
+ } else if (mode == "High Detail only") {
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled", 0);
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled", 0);
+ } else {
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled", 1);
+ setprop("/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled", 1);
+ }
-
- hbox
- 1
+# if (!getprop("/sim/rendering/static-lod/aimp-bare") and !getprop("/sim/rendering/static-lod/aimp-detailed")) {
+# setprop("/sim/rendering/static-lod/aimp-bare", 0);
+# setprop("/sim/rendering/static-lod/aimp-detailed",100);
+# }
+ return mode;
+ };
-
-
-
+ reload_sliders = func(reload) {
+ if (!reload)
+ return ;
+ var current_dialog = getprop("/sim/gui/dialogs/current-dialog");
+ fgcommand("dialog-close", dlgLOD);
+ fgcommand("dialog-show", dlgLOD);
+ if (current_dialog != "") {
+ var show_node = props.Node.new({"dialog-name": current_dialog});
+ fgcommand("dialog-show", show_node);
+ }
+ }
+ ;
- 1
+ update_scenery_text = func{
+ var detailed = getprop("/sim/rendering/static-lod/detailed");
+ var bare = getprop("/sim/rendering/static-lod/bare-delta");
+ var rough = getprop("/sim/rendering/static-lod/rough-delta");
+ setprop("/sim/rendering/static-lod/detailed-description", sprintf("from %5.0fm to %5.0fm",0, detailed));
+ setprop("/sim/rendering/static-lod/rough-delta-description", sprintf("from %5.0fm to %5.0fm",detailed, rough+detailed));
+ setprop("/sim/rendering/static-lod/bare-delta-description", sprintf("from %5.0fm to %5.0fm",rough+detailed,rough+bare+detailed));
+ };
-
-
+ update_description = func(mode){
-
+ var descD = "";
+ var descB = "";
+ var descW = "";
-
- table
- center
+ if (getprop("sim/rendering/static-lod/aimp-range-mode-distance")) {
+ if (mode == "Low Detail only") {
+ if (getprop("/sim/rendering/static-lod/aimp-bare")>0) {
+ descD = sprintf("visible when viewpoint within\n%.0f meters", getprop("/sim/rendering/static-lod/aimp-detailed"));
+ } else {
+ descB = "always visible";
+ }
+ } else if (mode == "High Detail only") {
+ descW = "Always visible regardless of distance";
+ } else {
+ descW = "";
+ descD = sprintf("0 to %.0fm from viewpoint", getprop("/sim/rendering/static-lod/aimp-detailed"));
+ 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"));
+ var lowDetailRange = getprop("/sim/rendering/static-lod/aimp-detailed") + getprop("/sim/rendering/static-lod/aimp-bare") ;
+ if (lowDetailRange < 1000)
+ descW = sprintf("WARNING: Low Detail too close, nothing drawn over %.0fm", lowDetailRange);
-
- 0
13
-
-
+ }
+ } else {
+ if (mode == "Low Detail only") {
+ if (getprop("/sim/rendering/static-lod/aimp-bare")>0) {
+ descD = sprintf("visible when larger than\n%.0f pixels in size on screen", getprop("/sim/rendering/static-lod/aimp-detailed"));
+ descB = "";
+ descW = sprintf("WARNING: When smaller than %.0f pixels nothing will be drawn", getprop("/sim/rendering/static-lod/aimp-bare"));
+ } else {
+ descW = "";
+ descD = "";
+ descB = "always visible";
+ }
+ } else if (mode == "High Detail only") {
+ descW = "Always visible regardless of distance";
+ } else {
+ descW = "";
+ if (getprop("/sim/rendering/static-lod/aimp-bare")>0)
+ descW = sprintf("WARNING: Below %.0f pixels in size nothing will be drawn", getprop("/sim/rendering/static-lod/aimp-bare"));
+ descD = sprintf("above %.0f pixels in size", getprop("/sim/rendering/static-lod/aimp-detailed"));
+ descB = sprintf("above %.0f pixels in size", getprop("/sim/rendering/static-lod/aimp-bare"));
+ }
+ }
+ setprop("/sim/gui/dialogs/static-lod/aimp-detailed-description", descD);
+ setprop("/sim/gui/dialogs/static-lod/aimp-bare-description", descB);
+ setprop("/sim/gui/dialogs/static-lod/aimp-bare-description1", descW);
-
- 1
1
-
-
-
- 1
2
-
-
-
- 1
3
-
-
+ };
+ # returns non zero if the value was adjusted and it can be adjusted (can_reload)
+ adjustValue = func(id, nodeId, value, can_reload){
+ var node = nodeId.getNode(id);
+ if (node != nil) {
+ var cv = node.getValue();
+ if (cv != value) {
+ node.setValue(value);
+ if (can_reload)
+ reload_sliders(1);
+ }
+ }
+ return 0; # no need to reload.
+ }
-
- 2