1
0
Fork 0

LOD dialogs rework.

Big rework of the Adjust LOD ranges dialog to hopefully make it easier to understand, and harder to setup so that models aren't visible by accident.

All range entry is now via sliders.

The sliders are deltas from the previous value.

There is now the option to specifically choose either low detail or high detail AI/MP models. *NOTE* that for models without a fallback index the low detail model will be the blue yellow glider.

There is now clear indication of what happens for the Meters or Pixel modes.

Added a defaults button that will restore a reasonable set of default values.

The properties that were used have been renamed to ensure that sensible defaults will be picked, ideally we'd have a way to migrate things like this but I don't think we do, so this is a reasonable alternative.
This commit is contained in:
Richard Harrison 2018-10-30 20:19:10 +01:00
parent 416cf50507
commit 160abde2a6
3 changed files with 627 additions and 229 deletions

View file

@ -160,19 +160,22 @@ Started September 2000 by David Megginson, david@megginson.com
-->
<plod-minimum-expiry-time-secs type="double" userarchive="y">180.0</plod-minimum-expiry-time-secs>
<static-lod>
<detailed type="double" userarchive="y">1500</detailed>
<rough type="double" userarchive="y">9000</rough>
<bare type="double" userarchive="y">30000</bare>
<!--
ai-range-mode-pixel: true=use pixel size on screen, false=use distance from eyepoint
With /sim/rendering/static-lod/ai-range-mode-pixel set to true
/sim/rendering/static-lod/ai-detailed and /sim/rendering/static-lod/ai-bare now contains the minimum size of the
model on the screen to be displayed. Values of 10-50 seem to make some sense.
2018.3 changes to the way the LOD work
- reworked UI
- use the detailed with deltas to prevent silly values;
- removed the pixel range mode and added distance (the previous
code and UI had both pixel mode and range mode, need only one)
- For the AI/MP meters is the distance from the view point, wherease
pixels is the size on screen.
-->
<ai-range-mode-pixel type="bool" userarchive="y">false</ai-range-mode-pixel>
<ai-detailed type="double" userarchive="y">3000</ai-detailed>
<ai-bare type="double" userarchive="y">10000</ai-bare>
<ai-interior type="double" userarchive="y">50</ai-interior>
<detailed type="double" userarchive="y">1500</detailed>
<rough-delta type="double" userarchive="y">7500</rough-delta>
<bare-delta type="double" userarchive="y">21000</bare-delta>
<aimp-range-mode-distance type="bool" userarchive="y">false</aimp-range-mode-distance>
<aimp-detailed type="double" userarchive="y">400</aimp-detailed>
<aimp-bare type="double" userarchive="y">0</aimp-bare>
<aimp-interior type="double" userarchive="y">200</aimp-interior>
</static-lod>
<random-objects type="bool" userarchive="y">true</random-objects>
<random-vegetation type="bool" userarchive="y">true</random-vegetation>
@ -509,6 +512,7 @@ Started September 2000 by David Megginson, david@megginson.com
<path n="1">Huds/default.xml</path>
<path n="2">Huds/NTPS.xml</path>
<path n="3">Huds/minimal.xml</path>
<path n="4">Huds/developer.xml</path>
<!-- new HUD -->
<visibility n="1" type="bool">false</visibility>
<!-- new HUD -->

View file

@ -238,17 +238,6 @@
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Use detailed MP models</label>
<name>mpmodels</name>
<property>/sim/multiplay/use-detailed-models</property>
<binding>
<command>dialog-apply</command>
<object-name>mpmodels</object-name>
</binding>
</checkbox>
<empty>
<stretch>1</stretch>
</empty>

View file

@ -1,204 +1,582 @@
<?xml version="1.0"?>
<PropertyList>
<nasal>
<open>
<![CDATA[
var modePixel = (getprop("/sim/rendering/static-lod/ai-range-mode-pixel") == 1);
setprop( "/sim/gui/dialogs/static-lod/mode/pixel", modePixel );
setprop( "/sim/gui/dialogs/static-lod/mode/distance", !modePixel );
<nasal>
<open>
<![CDATA[
var lodDIALOG = cmdarg();
var dlgLOD = props.Node.new({"dialog-name": "static-lod"});
var reload_props = [
"/sim/rendering/static-lod/rough",
"/sim/rendering/static-lod/bare"];
var ai_mp_bare = gui.findElementByName(lodDIALOG, "aimp-bare");
var ai_mp_bare_label = gui.findElementByName(lodDIALOG, "aimp-bare-label");
var ai_mp_detailed = gui.findElementByName(lodDIALOG, "aimp-detailed");
var ai_mp_detailed_label = gui.findElementByName(lodDIALOG, "aimp-detailed-label");
var current_detailed = nil;
var current_bare = nil;
var current_ai_mp_mode = "";
var reload_vals = {};
foreach (var p; reload_props) {
reload_vals[p] = getprop(p);
}
]]>
</open>
</nasal>
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");
<name>static-lod</name>
<layout>vbox</layout>
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);
}
<group>
<layout>hbox</layout>
<empty><stretch>1</stretch></empty>
# 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;
};
<text>
<label>Adjust Level Of Detail Ranges</label>
</text>
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);
}
}
;
<empty><stretch>1</stretch></empty>
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));
};
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
update_description = func(mode){
<hrule/>
var descD = "";
var descB = "";
var descW = "";
<group>
<layout>table</layout>
<halign>center</halign>
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);
<text>
<row>0</row><col>1</col><colspan>3</colspan>
<label>Max. Ranges (m)</label>
</text>
}
} 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);
<text>
<row>1</row><col>1</col>
<label>Detailed</label>
</text>
<text>
<row>1</row><col>2</col>
<label>Rough</label>
</text>
<text>
<row>1</row><col>3</col>
<label>Bare</label>
</text>
};
# 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.
}
<text>
<row>2</row><col>0</col>
<halign>right</halign>
<label>Scenery</label>
</text>
update_ai_mp = func(can_reload) {
var mode = update_enabling ();
var distance_mode = getprop("sim/rendering/static-lod/aimp-range-mode-distance");
update_description(mode);
if (mode == "Low Detail only") {
setprop("/sim/rendering/static-lod/aimp-detailed",getprop("/sim/rendering/static-lod/aimp-bare"));
can_reload = adjustValue("max", ai_mp_bare, 2000, can_reload);
reload_sliders(can_reload);
} else if (mode == "High Detail only") {
# setprop("/sim/rendering/static-lod/aimp-bare", 0);
# setprop("/sim/rendering/static-lod/aimp-detailed",-1);
} else {
if (!distance_mode) {
if (getprop("/sim/rendering/static-lod/aimp-bare") > getprop("/sim/rendering/static-lod/aimp-detailed")){
setprop("/sim/rendering/static-lod/aimp-bare", getprop("/sim/rendering/static-lod/aimp-detailed")-1 ) ;
}
can_reload = adjustValue("max", ai_mp_detailed, 2000, can_reload);
can_reload = adjustValue("max", ai_mp_bare, getprop("/sim/rendering/static-lod/aimp-detailed"), can_reload);
} else {
can_reload = adjustValue("max", ai_mp_detailed, 3000, can_reload);
can_reload = adjustValue("max", ai_mp_bare, 3000, can_reload);
}
}
}
update_aimp_mode = func{
var new_mode = getprop("/sim/gui/dialogs/static-lod/aimp-mp-mode");
if (new_mode != current_ai_mp_mode) {
if (current_ai_mp_mode == "Specify Ranges") {
current_detailed = getprop("/sim/rendering/static-lod/aimp-detailed");
current_bare =getprop("/sim/rendering/static-lod/aimp-bare");
}
if (current_ai_mp_mode == "Low Detail only" or current_ai_mp_mode == "High Detail only") {
if (current_detailed != nil)
setprop("/sim/rendering/static-lod/aimp-detailed", current_detailed );
if (current_bare != nil)
setprop("/sim/rendering/static-lod/aimp-bare",current_bare);
}
if (new_mode == "High Detail only") {
setprop("/sim/rendering/static-lod/aimp-detailed", -1);
setprop("/sim/rendering/static-lod/aimp-bare",0);
} else if (new_mode == "Low Detail only"){
setprop("/sim/rendering/static-lod/aimp-detailed", 0);
setprop("/sim/rendering/static-lod/aimp-bare",0);
}
current_ai_mp_mode = new_mode;
}
update_description(update_enabling());
}
# setlistener("/sim/gui/dialogs/static-lod/aimp-mp-mode", func(v){
# },0 ,0);
<input>
<row>2</row><col>1</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/detailed</property>
</input>
update_scenery_text ();
update_ai_mp (0);
<input>
<row>2</row><col>2</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/rough</property>
</input>
<input>
<row>2</row><col>3</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/bare</property>
</input>
]]>
</open>
</nasal>
<text>
<row>3</row><col>0</col>
<halign>right</halign>
<label>AI/MP Aircraft</label>
</text>
<name>static-lod</name>
<layout>vbox</layout>
<input>
<row>3</row><col>1</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/ai-detailed</property>
</input>
<group>
<layout>hbox</layout>
<empty>
<stretch>1</stretch>
</empty>
<input>
<row>3</row><col>2</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/ai-bare</property>
</input>
<text>
<label>Adjust Level Of Detail Ranges</label>
</text>
<radio>
<row>3</row>
<col>3</col>
<halign>left</halign>
<name>pixel</name>
<property>sim/gui/dialogs/static-lod/mode/pixel</property>
<live>true</live>
<label>Pixel</label>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/static-lod/mode/distance</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/static-lod/mode/pixel</property>
<value>1</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/rendering/static-lod/ai-range-mode-pixel</property>
<value>1</value>
</binding>
</radio>
<empty>
<stretch>1</stretch>
</empty>
<radio>
<row>3</row>
<col>4</col>
<halign>left</halign>
<name>distance</name>
<property>sim/gui/dialogs/static-lod/mode/distance</property>
<live>true</live>
<label>Distance (m)</label>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/static-lod/mode/distance</property>
<value>1</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/static-lod/mode/pixel</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/rendering/static-lod/ai-range-mode-pixel</property>
<value>0</value>
</binding>
</radio>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<text>
<row>4</row><col>0</col>
<halign>right</halign>
<label>AI/MP Interior</label>
</text>
<hrule/>
<input>
<row>4</row><col>1</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/ai-interior</property>
</input>
<group>
<layout>table</layout>
<halign>center</halign>
<!-- // meaningless for now...
<input>
<row>3</row><col>3</col>
<halign>fill</halign>
<property>/sim/rendering/static-lod/ai-bare</property>
</input>
-->
</group>
<text>
<row>0</row>
<col>1</col>
<halign>center</halign>
<label>Scenery (Tiles, Buildings, Roads, Railways)</label>
</text>
<hrule/>
<text>
<row>1</row>
<col>0</col>
<label>Detailed</label>
</text>
<slider>
<row>1</row>
<col>1</col>
<pref-width>300</pref-width>
<pref-height>14</pref-height>
<name>scenery-detailed</name>
<property>/sim/rendering/static-lod/detailed</property>
<live>1</live>
<min>0</min>
<max>5000</max>
<binding>
<command>dialog-apply</command>
<object-name>scenery-detailed</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
<![CDATA[
update_scenery_text();
]]>
</script>
</binding>
</slider>
<group>
<layout>hbox</layout>
<default-padding>10</default-padding>
<empty><stretch>true</stretch></empty>
<button>
<legend>OK</legend>
<default>true</default>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script><![CDATA[
<text>
<row>1</row>
<col>2</col>
<halign>left</halign>
<label>xxxxxxxxxxxxxxxxxxx</label>
<live>true</live>
<property>/sim/rendering/static-lod/detailed-description</property>
</text>
<!--ROUGH -->
<text>
<row>2</row>
<col>0</col>
<label>Rough</label>
</text>
<slider>
<row>2</row>
<col>1</col>
<pref-width>300</pref-width>
<pref-height>14</pref-height>
<name>scenery-rough</name>
<property>/sim/rendering/static-lod/rough-delta</property>
<live>1</live>
<min>0</min>
<max>200000</max>
<binding>
<command>dialog-apply</command>
<object-name>scenery-rough</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
<![CDATA[
update_scenery_text();
]]>
</script>
</binding>
</slider>
<text>
<row>2</row>
<col>2</col>
<halign>left</halign>
<label>xxxxxxxxxxxxxx</label>
<live>true</live>
<property>/sim/rendering/static-lod/rough-delta-description</property>
</text>
<!--BARE -->
<text>
<row>3</row>
<col>0</col>
<label>Bare</label>
</text>
<slider>
<row>3</row>
<col>1</col>
<pref-width>300</pref-width>
<pref-height>14</pref-height>
<name>scenery-bare</name>
<property>/sim/rendering/static-lod/bare-delta</property>
<live>1</live>
<min>0</min>
<max>200000</max>
<binding>
<command>dialog-apply</command>
<object-name>scenery-bare</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
<![CDATA[
update_scenery_text();
]]>
</script>
</binding>
</slider>
<text>
<row>3</row>
<col>2</col>
<halign>left</halign>
<label>xxxxxxxxxxxxxx</label>
<live>true</live>
<property>/sim/rendering/static-lod/bare-delta-description</property>
</text>
<!-- end bare -->
<!--This is the AI/MP part-->
<hrule>
<row>4</row>
<col>0</col>
<colspan>7</colspan>
</hrule>
<text>
<row>5</row>
<col>1</col>
<halign>center</halign>
<label>AI/MP Aircraft</label>
</text>
<combo>
<row>6</row>
<col>1</col>
<pref-width>200</pref-width>
<name>aimp-mode</name>
<property>/sim/gui/dialogs/static-lod/aimp-mp-mode</property>
<value>Specify Ranges</value>
<value>Low Detail only</value>
<value>High Detail only</value>
<editable>false</editable>
<binding>
<command>dialog-apply</command>
<object-name>aimp-mode</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
<![CDATA[
update_aimp_mode();
]]>
</script>
</binding>
</combo>
<checkbox>
<row>6</row>
<col>2</col>
<halign>left</halign>
<name>distance</name>
<property>sim/rendering/static-lod/aimp-range-mode-distance</property>
<live>true</live>
<label>AI/MP in meters</label>
<binding>
<command>property-toggle</command>
<property>sim/rendering/static-lod/aimp-range-mode-distance</property>
<value>0</value>
</binding>
<binding>
<command>nasal</command>
<script>
<![CDATA[
update_ai_mp(0);
]]>
</script>
</binding>
</checkbox>
<!--ai - detail-->
<text>
<row>7</row>
<col>0</col>
<name>aimp-detailed-label</name>
<enable><property>/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled</property></enable>
<label>High Detail</label>
</text>
<slider>
<row>7</row>
<col>1</col>
<pref-width>300</pref-width>
<pref-height>14</pref-height>
<name>aimp-detailed</name>
<enable><property>/sim/gui/dialogs/static-lod/aimp-mp-detailed-enabled</property></enable>
<property>/sim/rendering/static-lod/aimp-detailed</property>
<live>1</live>
<min>0</min>
<max>1500</max>
<binding>
<command>dialog-apply</command>
<object-name>aimp-detailed</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
<![CDATA[
update_ai_mp(1);
]]>
</script>
</binding>
<binding>
<command>dialog-update</command>
</binding>
</slider>
<text>
<row>7</row>
<col>2</col>
<halign>left</halign>
<label>xxxxxxxxxxxxxxxxxxxxxxxxxx</label>
<live>true</live>
<property>/sim/gui/dialogs/static-lod/aimp-detailed-description</property>
</text>
<!-- end ai detail -->
<!--ai - bare-->
<text>
<name>aimp-bare-label</name>
<enable><property>/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled</property></enable>
<row>8</row>
<col>0</col>
<label>Low Detail</label>
</text>
<slider>
<row>8</row>
<col>1</col>
<enable><property>/sim/gui/dialogs/static-lod/aimp-mp-bare-enabled</property></enable>
<pref-width>300</pref-width>
<pref-height>14</pref-height>
<name>aimp-bare</name>
<property>/sim/rendering/static-lod/aimp-bare</property>
<live>1</live>
<min>0</min>
<max>1500</max>
<binding>
<command>dialog-apply</command>
<object-name>aimp-bare</object-name>
</binding>
<binding>
<command>nasal</command>
<script>
<![CDATA[
update_ai_mp(1);
]]>
</script>
</binding>
<binding>
<command>dialog-update</command>
</binding>
</slider>
<text>
<row>8</row>
<col>2</col>
<halign>left</halign>
<valign>top</valign>
<label>xxxxxxxxxxxxxxxxxxxxxxxxxx</label>
<live>true</live>
<property>/sim/gui/dialogs/static-lod/aimp-bare-description</property>
</text>
<text>
<row>9</row>
<col>1</col>
<halign>left</halign>
<valign>top</valign>
<label>xxxxxxxxxxxxxxxxxxxxxxxxxx</label>
<live>true</live>
<property>/sim/gui/dialogs/static-lod/aimp-bare-description1</property>
</text>
<text>
<row>11</row>
<col>0</col>
<halign>right</halign>
<label>AI/MP Interior</label>
</text>
<slider>
<row>11</row>
<col>1</col>
<pref-width>300</pref-width>
<pref-height>14</pref-height>
<name>aimp-interior</name>
<property>/sim/rendering/static-lod/aimp-interior</property>
<live>1</live>
<min>0</min>
<max>1500</max>
<binding>
<command>dialog-apply</command>
<object-name>aimp-interior</object-name>
</binding>
<!--<binding>
<command>nasal</command>
<script>
<![CDATA[
update_ai_mp(1);
]]>
</script>
</binding>
<binding>
<command>dialog-update</command>
</binding>-->
</slider>
<text>
<row>11</row>
<col>2</col>
<halign>left</halign>
<valign>top</valign>
<label>xxxxxxxxxxxxxxxxxxxxxxxxxx</label>
<format>%.0f </format>
<live>true</live>
<property>/sim/rendering/static-lod/aimp-interior</property>
</text>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<default-padding>10</default-padding>
<empty>
<stretch>true</stretch>
</empty>
<button>
<legend>OK</legend>
<default>true</default>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
<![CDATA[
var reinit = 0;
foreach (var p; reload_props) {
if (reload_vals[p] != getprop(p)) {
@ -211,41 +589,68 @@
fgcommand("reinit", props.Node.new({"subsystem": "scenery"}));
}
]]>
</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Apply</legend>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Reset</legend>
<equal>true</equal>
<binding>
<command>dialog-update</command>
</binding>
</button>
<empty><stretch>true</stretch></empty>
<button>
<legend>Cancel</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<empty>
<stretch>true</stretch>
</empty>
<button>
<legend>Apply</legend>
<equal>true</equal>
<binding>
<command>dialog-apply</command>
</binding>
</button>
<empty>
<stretch>true</stretch>
</empty>
<button>
<legend>Defaults</legend>
<equal>true</equal>
<!--end reset for pixel mode-->
<binding>
<command>nasal</command>
<script>
<![CDATA[
setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "Specify Ranges");
setprop("/sim/rendering/static-lod/detailed",1500);
setprop("/sim/rendering/static-lod/rough-delta",7500);
setprop("/sim/rendering/static-lod/bare-delta",21000);
if (getprop("sim/rendering/static-lod/aimp-range-mode-distance")){
# Reset for meters
setprop("/sim/rendering/static-lod/aimp-detailed",500);
setprop("/sim/rendering/static-lod/aimp-bare",2000);
setprop("/sim/rendering/static-lod/aimp-interior",50);
} else {
# Reset for pixel mode
setprop("/sim/rendering/static-lod/aimp-detailed",400);
setprop("/sim/rendering/static-lod/aimp-bare",0);
setprop("/sim/rendering/static-lod/aimp-interior",200);
}
update_description(update_enabling());
reload_sliders(1);
]]>
</script>
</binding>
</button>
<empty>
<stretch>true</stretch>
</empty>
<button>
<legend>Close</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<nasal>
<open>
</open>
</nasal>
</PropertyList>