Sim: Now ACCONFIG saves autopush prefs

This commit is contained in:
Josh Davidson 2019-03-24 00:02:51 -04:00
parent 157fcc1823
commit 0c5be65001
3 changed files with 16 additions and 1 deletions

View file

@ -94,6 +94,8 @@ setprop("/systems/acconfig/options/nd-rate", 1);
setprop("/systems/acconfig/options/uecam-rate", 1); setprop("/systems/acconfig/options/uecam-rate", 1);
setprop("/systems/acconfig/options/lecam-rate", 1); setprop("/systems/acconfig/options/lecam-rate", 1);
setprop("/systems/acconfig/options/iesi-rate", 1); setprop("/systems/acconfig/options/iesi-rate", 1);
setprop("/systems/acconfig/options/autopush/show-route", 1);
setprop("/systems/acconfig/options/autopush/show-wingtip", 1);
var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/IDG-A32X/AircraftConfig/main.xml"); var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/IDG-A32X/AircraftConfig/main.xml");
var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/IDG-A32X/AircraftConfig/welcome.xml"); var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/IDG-A32X/AircraftConfig/welcome.xml");
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/IDG-A32X/AircraftConfig/psload.xml"); var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/IDG-A32X/AircraftConfig/psload.xml");
@ -215,12 +217,17 @@ var readSettings = func {
setprop("/options/system/keyboard-mode", getprop("/systems/acconfig/options/keyboard-mode")); setprop("/options/system/keyboard-mode", getprop("/systems/acconfig/options/keyboard-mode"));
setprop("/options/system/laptop-mode", getprop("/systems/acconfig/options/laptop-mode")); setprop("/options/system/laptop-mode", getprop("/systems/acconfig/options/laptop-mode"));
setprop("/controls/adirs/skip", getprop("/systems/acconfig/options/adirs-skip")); 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"));
} }
var writeSettings = func { var writeSettings = func {
setprop("/systems/acconfig/options/keyboard-mode", getprop("/options/system/keyboard-mode")); setprop("/systems/acconfig/options/keyboard-mode", getprop("/options/system/keyboard-mode"));
setprop("/systems/acconfig/options/laptop-mode", getprop("/options/system/laptop-mode")); setprop("/systems/acconfig/options/laptop-mode", getprop("/options/system/laptop-mode"));
setprop("/systems/acconfig/options/adirs-skip", getprop("/controls/adirs/skip")); 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"));
io.write_properties(getprop("/sim/fg-home") ~ "/Export/IDG-A32X-config.xml", "/systems/acconfig/options"); io.write_properties(getprop("/sim/fg-home") ~ "/Export/IDG-A32X-config.xml", "/systems/acconfig/options");
} }

View file

@ -292,6 +292,10 @@ Distribute under the terms of GPLv2.
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding>
<command>nasal</command>
<script>acconfig.writeSettings();</script>
</binding>
</checkbox> </checkbox>
<text> <text>
@ -335,6 +339,10 @@ Distribute under the terms of GPLv2.
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding>
<command>nasal</command>
<script>acconfig.writeSettings();</script>
</binding>
</checkbox> </checkbox>
</group> </group>

View file

@ -1 +1 @@
4786 4787