1
0
Fork 0

Config option

Signed-off-by: merspieler <merspieler@airmail.cc>
This commit is contained in:
merspieler 2019-11-09 09:36:07 +00:00
parent fc56e14536
commit 21c9325111
3 changed files with 23 additions and 1 deletions

View file

@ -953,7 +953,6 @@
<options n="0">
<system n="0">
<keyboard-mode type="bool">0</keyboard-mode>
<laptop-mode type="bool">0</laptop-mode>
</system>
<steep-ils type="bool">0</steep-ils>
<steep-ils-avail type="bool">0</steep-ils-avail>

View file

@ -91,6 +91,7 @@ setprop("/systems/acconfig/out-of-date", 0);
setprop("/systems/acconfig/mismatch-code", "0x000");
setprop("/systems/acconfig/mismatch-reason", "XX");
setprop("/systems/acconfig/options/keyboard-mode", 0);
setprop("/systems/acconfig/options/weight-kgs", 1);
setprop("/systems/acconfig/options/adirs-skip", 0);
setprop("/systems/acconfig/options/welcome-skip", 0);
setprop("/systems/acconfig/options/no-rendering-warn", 0);
@ -219,6 +220,7 @@ var renderingSettings = {
var readSettings = func {
io.read_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
setprop("/options/system/keyboard-mode", getprop("/systems/acconfig/options/keyboard-mode"));
setprop("/options/system/weight-kgs", getprop("/systems/acconfig/options/weight-kgs"));
setprop("/controls/adirs/skip", getprop("/systems/acconfig/options/adirs-skip"));
setprop("/sim/model/autopush/route/show", getprop("/systems/acconfig/options/autopush/show-route"));
setprop("/sim/model/autopush/route/show-wingtip", getprop("/systems/acconfig/options/autopush/show-wingtip"));
@ -227,6 +229,7 @@ var readSettings = func {
var writeSettings = func {
setprop("/systems/acconfig/options/keyboard-mode", getprop("/options/system/keyboard-mode"));
setprop("/systems/acconfig/options/weight-kgs", getprop("/options/system/weight-kgs"));
setprop("/systems/acconfig/options/adirs-skip", getprop("/controls/adirs/skip"));
setprop("/systems/acconfig/options/autopush/show-route", getprop("/sim/model/autopush/route/show"));
setprop("/systems/acconfig/options/autopush/show-wingtip", getprop("/sim/model/autopush/route/show-wingtip"));

View file

@ -386,6 +386,26 @@
<live>true</live>
</checkbox>
<checkbox>
<label>Weight in KG</label>
<halign>left</halign>
<property>/options/system/weight-kgs</property>
<binding>
<command>property-toggle</command>
<property>/options/system/weight-kgs</property>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
acconfig.writeSettings();
</script>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>ADIRS Aligns Instantly</label>
<halign>left</halign>