1
0
Fork 0
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
This commit is contained in:
Vivian Meazza 2012-07-04 20:44:25 +01:00
parent 2a505cd29e
commit 85d64deb04

View file

@ -1,236 +1,247 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<PropertyList> <PropertyList>
<name>AIcarrier</name> <name>AIcarrier</name>
<modal>false</modal> <modal>false</modal>
<layout>vbox</layout> <layout>vbox</layout>
<!-- AI Carrier options --> <!-- AI Carrier options -->
<group> <group>
<layout>hbox</layout> <layout>hbox</layout>
<empty><stretch>1</stretch></empty> <empty>
<stretch>1</stretch>
</empty>
<text> <text>
<label>AI Carrier Controls</label> <label>AI Carrier Controls</label>
</text> </text>
<empty><stretch>1</stretch></empty> <empty>
<stretch>1</stretch>
</empty>
<button> <button>
<pref-width>16</pref-width> <pref-width>16</pref-width>
<pref-height>16</pref-height> <pref-height>16</pref-height>
<legend></legend> <legend></legend>
<keynum>27</keynum> <keynum>27</keynum>
<border>2</border> <border>2</border>
<binding> <binding>
<command>dialog-close</command> <command>dialog-close</command>
</binding> </binding>
</button> </button>
</group> </group>
<hrule/> <hrule/>
<group> <group>
<layout>hbox</layout> <layout>hbox</layout>
<empty> <empty>
<pref-width>10</pref-width> <pref-width>10</pref-width>
</empty> </empty>
<group> <group>
<layout>vbox</layout> <layout>vbox</layout>
<radio> <radio>
<halign>left</halign> <halign>left</halign>
<label>Turn to launch course</label> <label>Turn to launch course</label>
<property>/ai/models/carrier/controls/turn-to-launch-hdg</property> <property>/ai/models/carrier/controls/turn-to-launch-hdg</property>
<live>true</live> <live>true</live>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
var v = getprop("/ai/models/carrier/controls/turn-to-launch-hdg"); var v = getprop("/ai/models/carrier/controls/turn-to-launch-hdg");
foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){ foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
c.getNode("controls/turn-to-launch-hdg").setBoolValue(v); c.getNode("controls/turn-to-launch-hdg").setBoolValue(v);
c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0); c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0);
c.getNode("controls/turn-to-base-course").setBoolValue(0); c.getNode("controls/turn-to-base-course").setBoolValue(0);
} }
</script> </script>
</binding> </binding>
</radio> </radio>
<radio> <radio>
<halign>left</halign> <halign>left</halign>
<label>Turn to recovery course</label> <label>Turn to recovery course</label>
<property>/ai/models/carrier/controls/turn-to-recovery-hdg</property> <property>/ai/models/carrier/controls/turn-to-recovery-hdg</property>
<live>true</live> <live>true</live>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
var v = getprop("/ai/models/carrier/controls/turn-to-recovery-hdg"); var v = getprop("/ai/models/carrier/controls/turn-to-recovery-hdg");
foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){ foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
c.getNode("controls/turn-to-recovery-hdg").setBoolValue(v); c.getNode("controls/turn-to-recovery-hdg").setBoolValue(v);
c.getNode("controls/turn-to-launch-hdg").setBoolValue(0); c.getNode("controls/turn-to-launch-hdg").setBoolValue(0);
c.getNode("controls/turn-to-base-course").setBoolValue(0); c.getNode("controls/turn-to-base-course").setBoolValue(0);
} }
</script> </script>
</binding> </binding>
</radio> </radio>
<radio> <radio>
<halign>left</halign> <halign>left</halign>
<label>Turn to base course</label> <label>Turn to base course</label>
<property>/ai/models/carrier/controls/turn-to-base-course</property> <property>/ai/models/carrier/controls/turn-to-base-course</property>
<live>true</live> <live>true</live>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
var v = getprop("/ai/models/carrier/controls/turn-to-base-course"); var v = getprop("/ai/models/carrier/controls/turn-to-base-course");
foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){ foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")){
c.getNode("controls/turn-to-base-course").setBoolValue(v); c.getNode("controls/turn-to-base-course").setBoolValue(v);
c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0); c.getNode("controls/turn-to-recovery-hdg").setBoolValue(0);
c.getNode("controls/turn-to-launch-hdg").setBoolValue(0); c.getNode("controls/turn-to-launch-hdg").setBoolValue(0);
} }
</script> </script>
</binding> </binding>
</radio> </radio>
<checkbox> <checkbox>
<halign>left</halign> <halign>left</halign>
<label>Operate Deck Elevators</label> <label>Operate Deck Elevators</label>
<property>/ai/models/carrier/controls/elevators</property> <property>/ai/models/carrier/controls/elevators</property>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
var v = getprop("/ai/models/carrier/controls/elevators"); var v = getprop("/ai/models/carrier/controls/elevators");
foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")) foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier"))
c.getNode("controls/elevators").setBoolValue(v); c.getNode("controls/elevators").setBoolValue(v);
</script> </script>
</binding> </binding>
</checkbox> </checkbox>
<checkbox> <checkbox>
<halign>left</halign> <halign>left</halign>
<label>Enable LSO Communications</label> <label>Enable LSO Communications</label>
<property>/sim/current-view/lso-commentary</property> <property>/sim/current-view/lso-commentary</property>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
</checkbox> </checkbox>
<checkbox> <checkbox>
<halign>left</halign> <halign>left</halign>
<label>Enable Deck Park</label> <label>Enable Deck Park</label>
<property>/sim/current-view/deck-park</property> <property>/sim/current-view/deck-park</property>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
</checkbox> </checkbox>
<checkbox> <checkbox>
<halign>left</halign> <halign>left</halign>
<label>Deck Lights</label> <label>Deck Lights</label>
<property>/ai/models/carrier/controls/lighting/deck-lights</property> <property>/ai/models/carrier/controls/lighting/deck-lights</property>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
var v = getprop("/ai/models/carrier/controls/lighting/deck-lights"); var v = getprop("/ai/models/carrier/controls/lighting/deck-lights");
foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")) foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier"))
c.getNode("controls/lighting/deck-lights",1).setBoolValue(v); c.getNode("controls/lighting/deck-lights",1).setBoolValue(v);
</script> </script>
</binding> </binding>
</checkbox> </checkbox>
<text> <text>
<halign>left</halign> <halign>left</halign>
<label>Discrete Flightdeck Floodlights (Red)</label> <label>Discrete Flightdeck Floodlights (Red)</label>
</text> </text>
<slider> <slider>
<halign>left</halign> <halign>left</halign>
<width>75</width> <width>75</width>
<height>25</height> <height>25</height>
<property>/ai/models/carrier/controls/lighting/flood-lights-red-norm</property> <property>/ai/models/carrier/controls/lighting/flood-lights-red-norm</property>
<binding> <binding>
<command>nasal</command> <command>dialog-apply</command>
<script> </binding>
var v = getprop("/ai/models/carrier/controls/lighting/flood-lights-red-norm"); <binding>
foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier")) <command>nasal</command>
c.getNode("controls/lighting/flood-lights-red-norm",1).setDoubleValue(v); <script>
</script> print("get red light");
</binding> var v = getprop("/ai/models/carrier/controls/lighting/flood-lights-red-norm");
</slider> foreach (var c; props.globals.getNode("/ai/models").getChildren("carrier"))
{
c.getNode("controls/lighting/flood-lights-red-norm",1).setDoubleValue(v);
print("set red light", v);
}
</script>
</binding>
</slider>
</group> </group>
<empty> <empty>
<stretch>true</stretch> <stretch>true</stretch>
</empty> </empty>
</group> </group>
<hrule/> <hrule/>
<group> <group>
<layout>hbox</layout> <layout>hbox</layout>
<default-padding>6</default-padding> <default-padding>6</default-padding>
<empty> <empty>
<stretch>true</stretch> <stretch>true</stretch>
</empty> </empty>
<button> <button>
<legend>OK</legend> <legend>OK</legend>
<default>true</default> <default>true</default>
<equal>true</equal> <equal>true</equal>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding> <binding>
<command>dialog-close</command> <command>dialog-close</command>
</binding> </binding>
</button> </button>
<button> <button>
<legend>Apply</legend> <legend>Apply</legend>
<equal>true</equal> <equal>true</equal>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
</button> </button>
<button> <button>
<legend>Reset</legend> <legend>Reset</legend>
<equal>true</equal> <equal>true</equal>
<binding> <binding>
<command>dialog-update</command> <command>dialog-update</command>
</binding> </binding>
</button> </button>
<button> <button>
<legend>Cancel</legend> <legend>Cancel</legend>
<equal>true</equal> <equal>true</equal>
<key>Esc</key> <key>Esc</key>
<binding> <binding>
<command>dialog-close</command> <command>dialog-close</command>
</binding> </binding>
</button> </button>
<empty> <empty>
<stretch>true</stretch> <stretch>true</stretch>
</empty> </empty>
</group> </group>
</PropertyList> </PropertyList>