1
0
Fork 0
fgdata/Aircraft/c172p/gui/dialogs/aircraft-dialog.xml

847 lines
34 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
<!-- C172p-detailed
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-->
<PropertyList>
<name>aircraft-dialog</name>
<layout>vbox</layout>
<resizable>false</resizable>
<modal>false</modal>
<draggable>true</draggable>
<nasal>
<open>
# Bush kit
var p = getprop("fdm/jsbsim/bushkit");
setprop("/sim/model/c172p/bushkit_flag_0", 0);
setprop("/sim/model/c172p/bushkit_flag_1", 0);
setprop("/sim/model/c172p/bushkit_flag_2", 0);
setprop("/sim/model/c172p/bushkit_flag_3", 0);
setprop("/sim/model/c172p/bushkit_flag_4", 0);
setprop("/sim/model/c172p/bushkit_flag_5", 0);
setprop("/sim/model/c172p/bushkit_flag_" ~ p, 1);
# Engine power
var p = getprop("/controls/engines/active-engine");
setprop("sim/model/c172p/engine_flag_0", 0);
setprop("sim/model/c172p/engine_flag_1", 0);
setprop("sim/model/c172p/engine_flag_" ~ p, 1);
</open>
</nasal>
<group>
<layout>hbox</layout>
<empty><stretch>true</stretch></empty>
<text>
<label>Aircraft Options</label>
</text>
<empty><stretch>true</stretch></empty>
<button>
<legend/>
<key>Esc</key>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<padding>6</padding>
<group>
<layout>vbox</layout>
<checkbox>
<halign>left</halign>
<label>Start with engine running</label>
<property>/fdm/jsbsim/running</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Save state of aircraft between sessions</label>
<property>/sim/model/c172p/save-state</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Complex engine procedures and failures</label>
<property>/engines/active-engine/complex-engine-procedures</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<checkbox>
<halign>left</halign>
<label>Enable damage</label>
<property>/fdm/jsbsim/settings/damage</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
c172p.repair_damage();
</script>
</binding>
</checkbox>
<button>
<halign>right</halign>
<legend>Repair</legend>
<pref-width>60</pref-width>
<pref-height>28</pref-height>
<enable>
<and>
<not>
<property>/sim/freeze/replay-state</property>
</not>
<less-than>
<property>gear/gear[0]/rollspeed-ms</property>
<value>1.0</value>
</less-than>
<not>
<property>/engines/active-engine/running</property>
</not>
<equals>
<property>/engines/active-engine/rpm</property>
<value>0</value>
</equals>
</and>
</enable>
<binding>
<command>nasal</command>
<script>
c172p.repair_damage();
electrical.reset_battery_and_circuit_breakers();
c172p.click("engine-repair", 6.0);
c172p.dialog_battery_reload();
</script>
</binding>
<binding>
<condition>
<property>sim/model/c172p/engine_flag_0</property>
</condition>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>7.0</value>
</binding>
<binding>
<condition>
<property>sim/model/c172p/engine_flag_1</property>
</condition>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>8.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/carb_ice</property>
<value>0.0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/fdm/jsbsim/engine/damage-level</property>
<value>0</value>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<checkbox>
<halign>left</halign>
<label>Place control lock</label>
<property>sim/model/c172p/cockpit/control-lock-placed</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Enable wheel chocks</label>
<property>/sim/model/c172p/securing/chock</property>
<live>true</live>
<enable>
<property>/sim/model/c172p/securing/chock-can-have</property>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Put cowl plugs</label>
<property>/sim/model/c172p/securing/cowl-plugs-visible</property>
<live>true</live>
<enable>
<and>
<not>
<property>/engines/active-engine/running</property>
</not>
<equals>
<property>/engines/active-engine/rpm</property>
<value>0</value>
</equals>
</and>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Put pitot tube cover</label>
<property>/sim/model/c172p/securing/pitot-cover-visible</property>
<live>true</live>
<enable>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>1.0</value>
</less-than>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Enable left tie-down</label>
<property>/sim/model/c172p/securing/tiedownL-visible</property>
<live>true</live>
<enable>
<property>/sim/model/c172p/securing/tiedowns-can-have</property>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Enable right tie-down</label>
<property>/sim/model/c172p/securing/tiedownR-visible</property>
<live>true</live>
<enable>
<property>/sim/model/c172p/securing/tiedowns-can-have</property>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Enable tail tie-down</label>
<property>/sim/model/c172p/securing/tiedownT-visible</property>
<live>true</live>
<enable>
<property>/sim/model/c172p/securing/tiedowns-can-have</property>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<checkbox>
<halign>left</halign>
<label>Show human models</label>
<property>/sim/model/occupants</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Display shadow</label>
<property>/sim/rendering/shadow-volume</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Show Garmin 196 GPS</label>
<property>/sim/model/c172p/garmin196-visible</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Show Astro Tech LC2 Digital Clock</label>
<property>/sim/model/c172p/digitalclock-visible</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<halign>left</halign>
<label>Enable frost and fog</label>
<property>/sim/model/c172p/enable-fog-frost</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<label>Engine power options</label>
<halign>center</halign>
</text>
<group>
<layout>hbox</layout>
<radio>
<halign>left</halign>
<label>160 HP</label>
<property>sim/model/c172p/engine_flag_0</property>
<live>true</live>
<enable>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("/controls/engines/active-engine", 0);
setprop("controls/engines/engine/primer", 0);
setprop("sim/model/c172p/engine_flag_0", 1);
setprop("sim/model/c172p/engine_flag_1", 0);
</script>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>c172p-oil-dialog-180</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>c172p-oil-dialog-180</dialog-name>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>7.0</value>
</binding>
</radio>
<radio>
<halign>left</halign>
<label>180 HP</label>
<property>sim/model/c172p/engine_flag_1</property>
<live>true</live>
<enable>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("/controls/engines/active-engine", 1);
setprop("controls/engines/engine/primer", 0);
setprop("sim/model/c172p/engine_flag_0", 0);
setprop("sim/model/c172p/engine_flag_1", 1);
</script>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>c172p-oil-dialog-160</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>c172p-oil-dialog-160</dialog-name>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>8.0</value>
</binding>
</radio>
</group>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<label>Landing gear options</label>
<halign>center</halign>
</text>
<group>
<layout>hbox</layout>
<group>
<layout>vbox</layout>
<radio>
<halign>left</halign>
<label>Default</label>
<property>sim/model/c172p/bushkit_flag_0</property>
<live>true</live>
<enable>
<and>
<not>
<property>/sim/freeze/replay-state</property>
</not>
<not>
<property>fdm/jsbsim/hydro/active-norm</property>
</not>
</and>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("fdm/jsbsim/bushkit", 0);
setprop("sim/model/variant", 0);
setprop("sim/model/c172p/bushkit_flag_0",1);
setprop("sim/model/c172p/bushkit_flag_1",0);
setprop("sim/model/c172p/bushkit_flag_2",0);
setprop("sim/model/c172p/bushkit_flag_3",0);
setprop("sim/model/c172p/bushkit_flag_4",0);
setprop("sim/model/c172p/bushkit_flag_5",0);
# Select 160 HP engine
setprop("/controls/engines/active-engine", 0);
setprop("controls/engines/engine/primer", 0);
setprop("sim/model/c172p/engine_flag_0", 1);
setprop("sim/model/c172p/engine_flag_1", 0);
</script>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>c172p-oil-dialog-180</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>c172p-oil-dialog-180</dialog-name>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>7.0</value>
</binding>
</radio>
<radio>
<halign>left</halign>
<label>26"</label>
<property>sim/model/c172p/bushkit_flag_1</property>
<live>true</live>
<enable>
<and>
<not>
<property>/sim/freeze/replay-state</property>
</not>
<not>
<property>fdm/jsbsim/hydro/active-norm</property>
</not>
</and>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("fdm/jsbsim/bushkit", 1);
setprop("sim/model/variant", 1);
setprop("sim/model/c172p/bushkit_flag_0",0);
setprop("sim/model/c172p/bushkit_flag_1",1);
setprop("sim/model/c172p/bushkit_flag_2",0);
setprop("sim/model/c172p/bushkit_flag_3",0);
setprop("sim/model/c172p/bushkit_flag_4",0);
setprop("sim/model/c172p/bushkit_flag_5",0);
# Select 160 HP engine
setprop("/controls/engines/active-engine", 0);
setprop("controls/engines/engine/primer", 0);
setprop("sim/model/c172p/engine_flag_0", 1);
setprop("sim/model/c172p/engine_flag_1", 0);
</script>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>c172p-oil-dialog-180</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>c172p-oil-dialog-180</dialog-name>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>7.0</value>
</binding>
</radio>
<radio>
<halign>left</halign>
<label>36"</label>
<property>sim/model/c172p/bushkit_flag_2</property>
<live>true</live>
<enable>
<and>
<not>
<property>/sim/freeze/replay-state</property>
</not>
<not>
<property>fdm/jsbsim/hydro/active-norm</property>
</not>
</and>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("fdm/jsbsim/bushkit", 2);
setprop("sim/model/variant", 2);
setprop("sim/model/c172p/bushkit_flag_0",0);
setprop("sim/model/c172p/bushkit_flag_1",0);
setprop("sim/model/c172p/bushkit_flag_2",1);
setprop("sim/model/c172p/bushkit_flag_3",0);
setprop("sim/model/c172p/bushkit_flag_4",0);
setprop("sim/model/c172p/bushkit_flag_5",0);
# Select 160 HP engine
setprop("/controls/engines/active-engine", 0);
setprop("controls/engines/engine/primer", 0);
setprop("sim/model/c172p/engine_flag_0", 1);
setprop("sim/model/c172p/engine_flag_1", 0);
</script>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>c172p-oil-dialog-180</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>c172p-oil-dialog-180</dialog-name>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>7.0</value>
</binding>
</radio>
</group>
<group>
<layout>vbox</layout>
<radio>
<halign>left</halign>
<label>Floats</label>
<property>sim/model/c172p/bushkit_flag_3</property>
<live>true</live>
<enable>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("fdm/jsbsim/bushkit", 3);
setprop("sim/model/variant", 3);
setprop("sim/model/c172p/bushkit_flag_0",0);
setprop("sim/model/c172p/bushkit_flag_1",0);
setprop("sim/model/c172p/bushkit_flag_2",0);
setprop("sim/model/c172p/bushkit_flag_3",1);
setprop("sim/model/c172p/bushkit_flag_4",0);
setprop("sim/model/c172p/bushkit_flag_5",0);
# Select 180 HP engine
setprop("/controls/engines/active-engine", 1);
setprop("controls/engines/engine/primer", 0);
setprop("sim/model/c172p/engine_flag_0", 0);
setprop("sim/model/c172p/engine_flag_1", 1);
</script>
</binding>
<binding>
<command>property-assign</command>
<property>sim/model/c172p/securing/chock</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/model/c172p/securing/tiedownL-visible</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/model/c172p/securing/tiedownR-visible</property>
<value>false</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/model/c172p/securing/tiedownT-visible</property>
<value>false</value>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>c172p-oil-dialog-160</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>c172p-oil-dialog-160</dialog-name>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>8.0</value>
</binding>
</radio>
<radio>
<halign>left</halign>
<label>Amphibious</label>
<property>sim/model/c172p/bushkit_flag_4</property>
<live>true</live>
<enable>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("fdm/jsbsim/bushkit", 4);
setprop("sim/model/variant", 4);
setprop("sim/model/c172p/bushkit_flag_0",0);
setprop("sim/model/c172p/bushkit_flag_1",0);
setprop("sim/model/c172p/bushkit_flag_2",0);
setprop("sim/model/c172p/bushkit_flag_3",0);
setprop("sim/model/c172p/bushkit_flag_4",1);
setprop("sim/model/c172p/bushkit_flag_5",0);
# Select 180 HP engine
setprop("/controls/engines/active-engine", 1);
setprop("controls/engines/engine/primer", 0);
setprop("sim/model/c172p/engine_flag_0", 0);
setprop("sim/model/c172p/engine_flag_1", 1);
</script>
</binding>
<binding>
<command>property-assign</command>
<property>sim/model/c172p/securing/chock</property>
<value>false</value>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>c172p-oil-dialog-160</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>c172p-oil-dialog-160</dialog-name>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>8.0</value>
</binding>
</radio>
<radio>
<halign>left</halign>
<label>Snow skis</label>
<property>sim/model/c172p/bushkit_flag_5</property>
<live>true</live>
<enable>
<and>
<not>
<property>/sim/freeze/replay-state</property>
</not>
<not>
<property>fdm/jsbsim/hydro/active-norm</property>
</not>
</and>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
setprop("fdm/jsbsim/bushkit", 5);
setprop("sim/model/variant", 5);
setprop("sim/model/c172p/bushkit_flag_0",0);
setprop("sim/model/c172p/bushkit_flag_1",0);
setprop("sim/model/c172p/bushkit_flag_2",0);
setprop("sim/model/c172p/bushkit_flag_3",0);
setprop("sim/model/c172p/bushkit_flag_4",0);
setprop("sim/model/c172p/bushkit_flag_5",1);
# Select 180 HP engine
setprop("/controls/engines/active-engine", 1);
setprop("controls/engines/engine/primer", 0);
setprop("sim/model/c172p/engine_flag_0", 0);
setprop("sim/model/c172p/engine_flag_1", 1);
</script>
</binding>
<binding>
<command>property-assign</command>
<property>sim/model/c172p/securing/chock</property>
<value>false</value>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>c172p-oil-dialog-160</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
<dialog-name>c172p-oil-dialog-160</dialog-name>
</binding>
<binding>
<command>property-assign</command>
<property>/engines/active-engine/oil-level</property>
<value>8.0</value>
</binding>
</radio>
</group>
</group>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<checkbox>
<halign>left</halign>
<label>Spawn at seaport if available</label>
<property>/controls/mooring/automatic</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<button>
<halign>right</halign>
<legend>Go now</legend>
<pref-width>60</pref-width>
<pref-height>28</pref-height>
<enable>
<and>
<property>/controls/mooring/allowed</property>
<not>
<property>/sim/freeze/replay-state</property>
</not>
</and>
</enable>
<binding>
<command>property-toggle</command>
<property>/controls/mooring/go-to-mooring</property>
</binding>
</button>
</group>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<default-padding>6</default-padding>
<empty><stretch>true</stretch></empty>
<button>
<legend>Close</legend>
<equal>true</equal>
<key>Esc</key>
<default>true</default>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</PropertyList>