1
0
Fork 0

FO default view option

This commit is contained in:
Lukas Gafner 2020-05-06 10:42:17 +02:00
parent d5995a7ce6
commit aa556ba7c7
2 changed files with 27 additions and 1 deletions

View file

@ -194,6 +194,11 @@ setlistener("/sim/signals/fdm-initialized", func {
{
save.restore(save.default, getprop("/sim/fg-home") ~ "/Export/" ~ getprop("/sim/aircraft") ~ "-save.xml");
}
if (getprop("/options/system/fo-view") {
setprop("/sim/current-view/name", "Copilot View");
}
spinning.stop();
});
@ -239,7 +244,7 @@ var readSettings = func {
setprop("/systems/apu/oil/allow-oil-consumption", getprop("/systems/acconfig/options/allow-oil-consumption"));
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"));
setprop("/options/system/fo-view", getprop("/systems/acconfig/options/fo-view"));
}
var writeSettings = func {
@ -250,6 +255,7 @@ var writeSettings = func {
setprop("/systems/acconfig/options/allow-oil-consumption", getprop("/systems/apu/oil/allow-oil-consumption"));
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"));
setprop("/systems/acconfig/options/fo-view", getprop("/options/system/fo-view"));
io.write_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
}

View file

@ -406,6 +406,26 @@
</binding>
<live>true</live>
</checkbox -->
<checkbox>
<label>Default First-Officer view</label>
<halign>left</halign>
<property>/options/system/fo-view</property>
<binding>
<command>property-toggle</command>
<property>/options/system/fo-view</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>