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:
parent
416cf50507
commit
160abde2a6
3 changed files with 627 additions and 229 deletions
26
defaults.xml
26
defaults.xml
|
@ -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>
|
<plod-minimum-expiry-time-secs type="double" userarchive="y">180.0</plod-minimum-expiry-time-secs>
|
||||||
<static-lod>
|
<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
|
2018.3 changes to the way the LOD work
|
||||||
With /sim/rendering/static-lod/ai-range-mode-pixel set to true
|
- reworked UI
|
||||||
/sim/rendering/static-lod/ai-detailed and /sim/rendering/static-lod/ai-bare now contains the minimum size of the
|
- use the detailed with deltas to prevent silly values;
|
||||||
model on the screen to be displayed. Values of 10-50 seem to make some sense.
|
- 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>
|
<detailed type="double" userarchive="y">1500</detailed>
|
||||||
<ai-detailed type="double" userarchive="y">3000</ai-detailed>
|
<rough-delta type="double" userarchive="y">7500</rough-delta>
|
||||||
<ai-bare type="double" userarchive="y">10000</ai-bare>
|
<bare-delta type="double" userarchive="y">21000</bare-delta>
|
||||||
<ai-interior type="double" userarchive="y">50</ai-interior>
|
<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>
|
</static-lod>
|
||||||
<random-objects type="bool" userarchive="y">true</random-objects>
|
<random-objects type="bool" userarchive="y">true</random-objects>
|
||||||
<random-vegetation type="bool" userarchive="y">true</random-vegetation>
|
<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="1">Huds/default.xml</path>
|
||||||
<path n="2">Huds/NTPS.xml</path>
|
<path n="2">Huds/NTPS.xml</path>
|
||||||
<path n="3">Huds/minimal.xml</path>
|
<path n="3">Huds/minimal.xml</path>
|
||||||
|
<path n="4">Huds/developer.xml</path>
|
||||||
<!-- new HUD -->
|
<!-- new HUD -->
|
||||||
<visibility n="1" type="bool">false</visibility>
|
<visibility n="1" type="bool">false</visibility>
|
||||||
<!-- new HUD -->
|
<!-- new HUD -->
|
||||||
|
|
|
@ -238,17 +238,6 @@
|
||||||
</binding>
|
</binding>
|
||||||
</checkbox>
|
</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>
|
<empty>
|
||||||
<stretch>1</stretch>
|
<stretch>1</stretch>
|
||||||
</empty>
|
</empty>
|
||||||
|
|
|
@ -1,204 +1,582 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<nasal>
|
<nasal>
|
||||||
<open>
|
<open>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var modePixel = (getprop("/sim/rendering/static-lod/ai-range-mode-pixel") == 1);
|
var lodDIALOG = cmdarg();
|
||||||
setprop( "/sim/gui/dialogs/static-lod/mode/pixel", modePixel );
|
var dlgLOD = props.Node.new({"dialog-name": "static-lod"});
|
||||||
setprop( "/sim/gui/dialogs/static-lod/mode/distance", !modePixel );
|
|
||||||
|
|
||||||
var reload_props = [
|
var ai_mp_bare = gui.findElementByName(lodDIALOG, "aimp-bare");
|
||||||
"/sim/rendering/static-lod/rough",
|
var ai_mp_bare_label = gui.findElementByName(lodDIALOG, "aimp-bare-label");
|
||||||
"/sim/rendering/static-lod/bare"];
|
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 = {};
|
if (getprop("/sim/rendering/static-lod/aimp-detailed") < 0)
|
||||||
foreach (var p; reload_props) {
|
setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "High Detail only");
|
||||||
reload_vals[p] = getprop(p);
|
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
|
||||||
</open>
|
setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "Specify Ranges");
|
||||||
</nasal>
|
|
||||||
|
|
||||||
<name>static-lod</name>
|
update_enabling = func{
|
||||||
<layout>vbox</layout>
|
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>
|
# if (!getprop("/sim/rendering/static-lod/aimp-bare") and !getprop("/sim/rendering/static-lod/aimp-detailed")) {
|
||||||
<layout>hbox</layout>
|
# setprop("/sim/rendering/static-lod/aimp-bare", 0);
|
||||||
<empty><stretch>1</stretch></empty>
|
# setprop("/sim/rendering/static-lod/aimp-detailed",100);
|
||||||
|
# }
|
||||||
|
return mode;
|
||||||
|
};
|
||||||
|
|
||||||
<text>
|
reload_sliders = func(reload) {
|
||||||
<label>Adjust Level Of Detail Ranges</label>
|
if (!reload)
|
||||||
</text>
|
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>
|
update_description = func(mode){
|
||||||
<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>
|
|
||||||
|
|
||||||
<hrule/>
|
var descD = "";
|
||||||
|
var descB = "";
|
||||||
|
var descW = "";
|
||||||
|
|
||||||
<group>
|
if (getprop("sim/rendering/static-lod/aimp-range-mode-distance")) {
|
||||||
<layout>table</layout>
|
if (mode == "Low Detail only") {
|
||||||
<halign>center</halign>
|
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>
|
} else {
|
||||||
<label>Max. Ranges (m)</label>
|
if (mode == "Low Detail only") {
|
||||||
</text>
|
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>
|
# returns non zero if the value was adjusted and it can be adjusted (can_reload)
|
||||||
<label>Detailed</label>
|
adjustValue = func(id, nodeId, value, can_reload){
|
||||||
</text>
|
var node = nodeId.getNode(id);
|
||||||
<text>
|
if (node != nil) {
|
||||||
<row>1</row><col>2</col>
|
var cv = node.getValue();
|
||||||
<label>Rough</label>
|
if (cv != value) {
|
||||||
</text>
|
node.setValue(value);
|
||||||
<text>
|
if (can_reload)
|
||||||
<row>1</row><col>3</col>
|
reload_sliders(1);
|
||||||
<label>Bare</label>
|
}
|
||||||
</text>
|
}
|
||||||
|
return 0; # no need to reload.
|
||||||
|
}
|
||||||
|
|
||||||
<text>
|
update_ai_mp = func(can_reload) {
|
||||||
<row>2</row><col>0</col>
|
var mode = update_enabling ();
|
||||||
<halign>right</halign>
|
var distance_mode = getprop("sim/rendering/static-lod/aimp-range-mode-distance");
|
||||||
<label>Scenery</label>
|
update_description(mode);
|
||||||
</text>
|
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>
|
update_scenery_text ();
|
||||||
<row>2</row><col>1</col>
|
update_ai_mp (0);
|
||||||
<halign>fill</halign>
|
|
||||||
<property>/sim/rendering/static-lod/detailed</property>
|
|
||||||
</input>
|
|
||||||
|
|
||||||
<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>
|
</open>
|
||||||
<halign>fill</halign>
|
</nasal>
|
||||||
<property>/sim/rendering/static-lod/bare</property>
|
|
||||||
</input>
|
|
||||||
|
|
||||||
<text>
|
<name>static-lod</name>
|
||||||
<row>3</row><col>0</col>
|
<layout>vbox</layout>
|
||||||
<halign>right</halign>
|
|
||||||
<label>AI/MP Aircraft</label>
|
|
||||||
</text>
|
|
||||||
|
|
||||||
<input>
|
<group>
|
||||||
<row>3</row><col>1</col>
|
<layout>hbox</layout>
|
||||||
<halign>fill</halign>
|
<empty>
|
||||||
<property>/sim/rendering/static-lod/ai-detailed</property>
|
<stretch>1</stretch>
|
||||||
</input>
|
</empty>
|
||||||
|
|
||||||
<input>
|
<text>
|
||||||
<row>3</row><col>2</col>
|
<label>Adjust Level Of Detail Ranges</label>
|
||||||
<halign>fill</halign>
|
</text>
|
||||||
<property>/sim/rendering/static-lod/ai-bare</property>
|
|
||||||
</input>
|
|
||||||
|
|
||||||
<radio>
|
<empty>
|
||||||
<row>3</row>
|
<stretch>1</stretch>
|
||||||
<col>3</col>
|
</empty>
|
||||||
<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>
|
|
||||||
|
|
||||||
<radio>
|
<button>
|
||||||
<row>3</row>
|
<pref-width>16</pref-width>
|
||||||
<col>4</col>
|
<pref-height>16</pref-height>
|
||||||
<halign>left</halign>
|
<legend></legend>
|
||||||
<name>distance</name>
|
<keynum>27</keynum>
|
||||||
<property>sim/gui/dialogs/static-lod/mode/distance</property>
|
<border>2</border>
|
||||||
<live>true</live>
|
<binding>
|
||||||
<label>Distance (m)</label>
|
<command>dialog-close</command>
|
||||||
<binding>
|
</binding>
|
||||||
<command>property-assign</command>
|
</button>
|
||||||
<property>sim/gui/dialogs/static-lod/mode/distance</property>
|
</group>
|
||||||
<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>
|
|
||||||
|
|
||||||
<text>
|
<hrule/>
|
||||||
<row>4</row><col>0</col>
|
|
||||||
<halign>right</halign>
|
|
||||||
<label>AI/MP Interior</label>
|
|
||||||
</text>
|
|
||||||
|
|
||||||
<input>
|
<group>
|
||||||
<row>4</row><col>1</col>
|
<layout>table</layout>
|
||||||
<halign>fill</halign>
|
<halign>center</halign>
|
||||||
<property>/sim/rendering/static-lod/ai-interior</property>
|
|
||||||
</input>
|
|
||||||
|
|
||||||
<!-- // 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>
|
<text>
|
||||||
<layout>hbox</layout>
|
<row>1</row>
|
||||||
<default-padding>10</default-padding>
|
<col>2</col>
|
||||||
<empty><stretch>true</stretch></empty>
|
<halign>left</halign>
|
||||||
<button>
|
<label>xxxxxxxxxxxxxxxxxxx</label>
|
||||||
<legend>OK</legend>
|
<live>true</live>
|
||||||
<default>true</default>
|
<property>/sim/rendering/static-lod/detailed-description</property>
|
||||||
<equal>true</equal>
|
</text>
|
||||||
<binding>
|
|
||||||
<command>dialog-apply</command>
|
<!--ROUGH -->
|
||||||
</binding>
|
<text>
|
||||||
<binding>
|
<row>2</row>
|
||||||
<command>nasal</command>
|
<col>0</col>
|
||||||
<script><![CDATA[
|
<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;
|
var reinit = 0;
|
||||||
foreach (var p; reload_props) {
|
foreach (var p; reload_props) {
|
||||||
if (reload_vals[p] != getprop(p)) {
|
if (reload_vals[p] != getprop(p)) {
|
||||||
|
@ -211,41 +589,68 @@
|
||||||
fgcommand("reinit", props.Node.new({"subsystem": "scenery"}));
|
fgcommand("reinit", props.Node.new({"subsystem": "scenery"}));
|
||||||
}
|
}
|
||||||
]]>
|
]]>
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-close</command>
|
<command>dialog-close</command>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
<empty><stretch>true</stretch></empty>
|
<empty>
|
||||||
<button>
|
<stretch>true</stretch>
|
||||||
<legend>Apply</legend>
|
</empty>
|
||||||
<equal>true</equal>
|
<button>
|
||||||
<binding>
|
<legend>Apply</legend>
|
||||||
<command>dialog-apply</command>
|
<equal>true</equal>
|
||||||
</binding>
|
<binding>
|
||||||
</button>
|
<command>dialog-apply</command>
|
||||||
<empty><stretch>true</stretch></empty>
|
</binding>
|
||||||
<button>
|
</button>
|
||||||
<legend>Reset</legend>
|
<empty>
|
||||||
<equal>true</equal>
|
<stretch>true</stretch>
|
||||||
<binding>
|
</empty>
|
||||||
<command>dialog-update</command>
|
|
||||||
</binding>
|
<button>
|
||||||
</button>
|
<legend>Defaults</legend>
|
||||||
<empty><stretch>true</stretch></empty>
|
<equal>true</equal>
|
||||||
<button>
|
|
||||||
<legend>Cancel</legend>
|
<!--end reset for pixel mode-->
|
||||||
<key>Esc</key>
|
<binding>
|
||||||
<binding>
|
<command>nasal</command>
|
||||||
<command>dialog-close</command>
|
<script>
|
||||||
</binding>
|
<![CDATA[
|
||||||
</button>
|
setprop("/sim/gui/dialogs/static-lod/aimp-mp-mode", "Specify Ranges");
|
||||||
</group>
|
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>
|
</PropertyList>
|
||||||
|
|
Loading…
Add table
Reference in a new issue