123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533 |
- <?xml version="1.0"?>
- <!-- Eurocopter EC 130 Helicopter by Heiko Schulz, Michael Habarta
- This file is part of FlightGear, the free flight simulator
- http://www.flightgear.org/
- Copyright (C) 2009 Heiko Schulz, Heiko.H.Schulz@gmx.net
- (C) 2016 Michael Habarta, mhabarta@freenet.de
- 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>Options</name>
- <layout>vbox</layout>
- <resizable>false</resizable>
- <modal>false</modal>
- <draggable>true</draggable>
- <default-padding>3</default-padding>
- <nasal>
- <open>
- <!-- disable shadow if rembrandt enabled -->
- if ( getprop("/sim/rendering/rembrandt/enabled")) {
- setprop("sim/model/ec130/shadow",0);
- }
- <!-- init windscreen option -->
- var p = getprop("/sim/model/ec130/cockpit-windscreen-option");
- setprop("/sim/model/ec130/cockpit_windscreen_flag_0",0);
- setprop("/sim/model/ec130/cockpit_windscreen_flag_1",0);
- setprop("/sim/model/ec130/cockpit_windscreen_flag_2",0);
- if ( p == 0 ) { setprop("/sim/model/ec130/cockpit_windscreen_flag_0",1); }
- if ( p == 1 ) { setprop("/sim/model/ec130/cockpit_windscreen_flag_1",1); }
- if ( p == 2 ) { setprop("/sim/model/ec130/cockpit_windscreen_flag_2",1); }
- <!-- init light cone visible -->
- var p = getprop("/sim/model/searchlight/cone-visibility");
- setprop("/sim/model/searchlight/cone_flag_0",0);
- setprop("/sim/model/searchlight/cone_flag_1",0);
- setprop("/sim/model/searchlight/cone_flag_2",0);
- setprop("/sim/model/searchlight/cone_flag_3",0);
- if ( p == 0 ) { setprop("/sim/model/searchlight/cone_flag_0",1); }
- if ( p == 1 ) { setprop("/sim/model/searchlight/cone_flag_1",1); }
- if ( p == 2 ) { setprop("/sim/model/searchlight/cone_flag_2",1); }
- if ( p == 3 ) { setprop("/sim/model/searchlight/cone_flag_3",1); }
- <!-- init wakevisible -->
- var p = getprop("rotors/main/wakevisible");
- setprop("rotors/main/wake_flag_0",0);
- setprop("rotors/main/wake_flag_1",0);
- setprop("rotors/main/wake_flag_2",0);
- setprop("rotors/main/wake_flag_3",0);
- if ( p == 0 ) { setprop("rotors/main/wake_flag_0",1); }
- if ( p == 1 ) { setprop("rotors/main/wake_flag_1",1); }
- if ( p == 2 ) { setprop("rotors/main/wake_flag_2",1); }
- if ( p == 3 ) { setprop("rotors/main/wake_flag_3",1); }
- <!-- set title -->
- if ( getprop("/sim/model/variant") == "1" ) {
- setprop("/sim/gui/dialogs/ec130/options/dialog/group/text/label", "EC130-B4 Simulation Options (AltGr-o)");
- } else {
- setprop("/sim/gui/dialogs/ec130/options/dialog/group/text/label", " H130 Simulation Options (AltGr-o)");
- }
- </open>
- <close># just kept for educational purposes :-)</close>
- </nasal>
- <!-- Title with Esc knob for closing -->
- <group>
- <layout>hbox</layout>
- <empty><stretch>1</stretch></empty>
- <!-- title is set through nasal script above -->
- <text>
- <label>x</label>
- </text>
- <empty><stretch>true</stretch></empty>
- <button>
- <legend></legend>
- <key>Esc</key>
- <pref-width>16</pref-width>
- <pref-height>16</pref-height>
- <binding>
- <command>nasal</command>
- <script>ec130.options_dialog.toggle()</script>
- </binding>
- </button>
- </group>
- <hrule/>
- <group>
- <layout>table</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <!-- only to get a gap between left border and checkbox -->
- <text>
- <row>0</row>
- <col>0</col>
- <label> </label>
- <halign>left</halign>
- </text>
- <checkbox>
- <row>0</row>
- <col>1</col>
- <halign>left</halign>
- <label> Shadow enabled (if Rembrandt OFF)</label>
- <property>sim/model/ec130/shadow</property>
- <live>true</live>
- <enable>
- <not>
- <property>/sim/rendering/rembrandt/enabled</property>
- </not>
- </enable>
- <binding>
- <command>dialog-apply</command>
- </binding>
- </checkbox>
- </group>
- <!-- only to get a empty line before next -->
- <text>
- <label> -----------------------</label>
- <halign>left</halign>
- </text>
- <text>
- <label> Windscreen:</label>
- <halign>left</halign>
- </text>
- <group>
- <layout>table</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <!-- only to get a gap between left border and checkbox -->
- <text>
- <row>0</row>
- <col>0</col>
- <label> </label>
- <halign>left</halign>
- </text>
- <radio>
- <row>0</row>
- <col>1</col>
- <halign>left</halign>
- <label> clear</label>
- <property>sim/model/ec130/cockpit_windscreen_flag_0</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- <!--
- setprop("sim/model/ec130/cockpit_windscreen_flag_0",0);
- -->
- setprop("sim/model/ec130/cockpit_windscreen_flag_1",0);
- setprop("sim/model/ec130/cockpit_windscreen_flag_2",0);
- setprop("sim/model/ec130/cockpit-windscreen-option",0);
- </script>
- </binding>
- </radio>
- <radio>
- <row>0</row>
- <col>2</col>
- <halign>left</halign>
- <label> visible</label>
- <property>sim/model/ec130/cockpit_windscreen_flag_1</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("sim/model/ec130/cockpit_windscreen_flag_0",0);
- <!--
- setprop("sim/model/ec130/cockpit_windscreen_flag_1",0);
- -->
- setprop("sim/model/ec130/cockpit_windscreen_flag_2",0);
- setprop("sim/model/ec130/cockpit-windscreen-option",1);
- </script>
- </binding>
- </radio>
- <radio>
- <row>0</row>
- <col>3</col>
- <halign>left</halign>
- <label> reflections</label>
- <property>sim/model/ec130/cockpit_windscreen_flag_2</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("sim/model/ec130/cockpit_windscreen_flag_0",0);
- setprop("sim/model/ec130/cockpit_windscreen_flag_1",0);
- <!--
- setprop("sim/model/ec130/cockpit_windscreen_flag_2",0);
- -->
- setprop("sim/model/ec130/cockpit-windscreen-option",2);
- </script>
- </binding>
- </radio>
- </group>
- <!-- only to get a empty line before next -->
- <text>
- <label> -----------------------</label>
- <halign>left</halign>
- </text>
- <text>
- <label> Light-Cone Visibility: (Alt-L)</label>
- <halign>left</halign>
- <enable>
- <property>controls/electric/engine/generator</property>
- <property>/sim/model/searchlight/active</property>
- </enable>
- </text>
- <group>
- <layout>table</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <!-- only to get a gap between left border and checkbox -->
- <text>
- <row>0</row>
- <col>0</col>
- <label> </label>
- <halign>left</halign>
- </text>
- <text>
- <row>0</row>
- <col>1</col>
- <label> </label>
- <halign>left</halign>
- </text>
- <radio>
- <row>0</row>
- <col>2</col>
- <halign>left</halign>
- <label> invisible</label>
- <property>/sim/model/searchlight/cone_flag_0</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("/sim/model/searchlight/cone-visibility",0);
- <!--
- setprop("/sim/model/searchlight/cone_flag_0",0);
- -->
- setprop("/sim/model/searchlight/cone_flag_1",0);
- setprop("/sim/model/searchlight/cone_flag_2",0);
- setprop("/sim/model/searchlight/cone_flag_3",0);
- </script>
- </binding>
- </radio>
- <radio>
- <row>0</row>
- <col>3</col>
- <halign>left</halign>
- <label> low</label>
- <property>/sim/model/searchlight/cone_flag_1</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("/sim/model/searchlight/cone-visibility",1);
- setprop("/sim/model/searchlight/cone_flag_0",0);
- <!--
- setprop("/sim/model/searchlight/cone_flag_1",0);
- -->
- setprop("/sim/model/searchlight/cone_flag_2",0);
- setprop("/sim/model/searchlight/cone_flag_3",0);
- </script>
- </binding>
- </radio>
- <radio>
- <row>1</row>
- <col>2</col>
- <halign>left</halign>
- <label> medium</label>
- <property>/sim/model/searchlight/cone_flag_2</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("/sim/model/searchlight/cone-visibility",2);
- setprop("/sim/model/searchlight/cone_flag_0",0);
- setprop("/sim/model/searchlight/cone_flag_1",0);
- <!--
- setprop("/sim/model/searchlight/cone_flag_2",0);
- -->
- setprop("/sim/model/searchlight/cone_flag_3",0);
- </script>
- </binding>
- </radio>
- <radio>
- <row>1</row>
- <col>3</col>
- <halign>left</halign>
- <label> bright </label>
- <property>/sim/model/searchlight/cone_flag_3</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("/sim/model/searchlight/cone-visibility",3);
- setprop("/sim/model/searchlight/cone_flag_0",0);
- setprop("/sim/model/searchlight/cone_flag_1",0);
- setprop("/sim/model/searchlight/cone_flag_2",0);
- <!--
- setprop("/sim/model/searchlight/cone_flag_3",0);
- -->
- </script>
- </binding>
- </radio>
- </group>
- <!-- only to get a empty line before next -->
- <text>
- <label> -----------------------</label>
- <halign>left</halign>
- </text>
- <text>
- <label> Rotor Wake Visibility: (Alt-k)</label>
- <halign>left</halign>
- </text>
- <group>
- <layout>table</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <!-- only to get a gap between left border and checkbox -->
- <text>
- <row>0</row>
- <col>0</col>
- <label> </label>
- <halign>left</halign>
- </text>
- <text>
- <row>0</row>
- <col>1</col>
- <label> </label>
- <halign>left</halign>
- </text>
- <radio>
- <row>0</row>
- <col>2</col>
- <halign>left</halign>
- <label> invisible</label>
- <property>rotors/main/wake_flag_0</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("rotors/main/wakevisible",0);
- gui.popupTip("Wake invisible");
- <!--
- setprop("rotors/main/wake_flag_0",0);
- -->
- setprop("rotors/main/wake_flag_1",0);
- setprop("rotors/main/wake_flag_2",0);
- setprop("rotors/main/wake_flag_3",0);
- </script>
- </binding>
- </radio>
- <radio>
- <row>0</row>
- <col>3</col>
- <halign>left</halign>
- <label> low</label>
- <property>rotors/main/wake_flag_1</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("rotors/main/wakevisible",1);
- gui.popupTip("Wake low");
- setprop("rotors/main/wake_flag_0",0);
- <!--
- setprop("rotors/main/wake_flag_1",0);
- -->
- setprop("rotors/main/wake_flag_2",0);
- setprop("rotors/main/wake_flag_3",0);
- </script>
- </binding>
- </radio>
- <radio>
- <row>1</row>
- <col>2</col>
- <halign>left</halign>
- <label> medium</label>
- <property>rotors/main/wake_flag_2</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("rotors/main/wakevisible",2);
- gui.popupTip("Wake medium");
- setprop("rotors/main/wake_flag_0",0);
- setprop("rotors/main/wake_flag_1",0);
- <!--
- setprop("rotors/main/wake_flag_2",0);
- -->
- setprop("rotors/main/wake_flag_3",0);
- </script>
- </binding>
- </radio>
- <radio>
- <row>1</row>
- <col>3</col>
- <halign>left</halign>
- <label> heavy (dynamic)</label>
- <property>rotors/main/wake_flag_3</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("rotors/main/wakevisible",3);
- gui.popupTip("Wake heavy");
- setprop("rotors/main/wake_flag_0",0);
- setprop("rotors/main/wake_flag_1",0);
- setprop("rotors/main/wake_flag_2",0);
- <!--
- setprop("rotors/main/wake_flag_3",0);
- -->
- </script>
- </binding>
- </radio>
- </group>
- <hrule/>
- <group>
- <layout>hbox</layout>
- <default-padding>3</default-padding>
- <button>
- <legend>Close</legend>
- <equal>true</equal>
- <key>Esc</key>
- <default>true</default>
- <binding>
- <command>nasal</command>
- <script>ec130.options_dialog.toggle()</script>
- </binding>
- </button>
- </group>
- </PropertyList>
|