123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608 |
- <?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>Antenna_Config</name>
- <layout>vbox</layout>
- <resizable>false</resizable>
- <modal>false</modal>
- <draggable>true</draggable>
- <default-padding>3</default-padding>
- <nasal>
- <open>
- <!-- flag for open dialog -->
- setprop("/sim/model/ec130/antenna_dialog_active",1);
- <!-- init roof antenna option -->
- var p = getprop("/sim/model/ec130/antenna_left");
- setprop("/sim/model/ec130/antenna_left_flag_0",0);
- setprop("/sim/model/ec130/antenna_left_flag_1",0);
- setprop("/sim/model/ec130/antenna_left_flag_2",0);
- if ( p == 1 ) { setprop("/sim/model/ec130/antenna_left_flag_0",1); }
- if ( p == 0 ) { setprop("/sim/model/ec130/antenna_left_flag_1",1); }
- if ( p == 2 ) { setprop("/sim/model/ec130/antenna_left_flag_2",1); }
- <!-- init tail square antenna option -->
- var p = getprop("/sim/model/ec130/antenna_square_tail");
- setprop("/sim/model/ec130/antenna_square_tail_flag_0",0);
- setprop("/sim/model/ec130/antenna_square_tail_flag_1",0);
- if ( p == 1 ) { setprop("/sim/model/ec130/antenna_square_tail_flag_0",1); }
- if ( p == 2 ) { setprop("/sim/model/ec130/antenna_square_tail_flag_1",1); }
- <!-- set title -->
- if ( getprop("/sim/model/variant") == "1" ) {
- setprop("/sim/gui/dialogs/ec130/antenna/dialog/group/text/label", "EC130-B4 Antenna Setup (Alt-a)");
- } else {
- setprop("/sim/gui/dialogs/ec130/antenna/dialog/group/text/label", "H130 Antenna Setup (Alt-a)");
- }
- </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>
- if ( getprop("/sim/model/ec130/config_dialog_active") ) {
- ec130.config_dialog.toggle();
- }
- ec130.antenna_config_dialog.toggle();
- setprop("/sim/model/ec130/antenna_dialog_active",0);
- </script>
- </binding>
- </button>
- </group>
- <hrule/>
- <!-- BEGIN box with 2 columns left/right -->
- <group>
- <layout>hbox</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <!-- BEGIN left column -->
- <group>
- <layout>vbox</layout>
- <default-padding>0</default-padding>
- <halign>left</halign>
- <group>
- <layout>table</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <text>
- <row>0</row>
- <col>0</col>
- <label> Roof:</label>
- <halign>left</halign>
- </text>
- <text>
- <row>1</row>
- <col>0</col>
- <label> Radio Antenna:</label>
- <halign>left</halign>
- </text>
- </group>
- <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> left</label>
- <property>sim/model/ec130/antenna_left_flag_0</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- <!--
- setprop("sim/model/ec130/antenna_left_flag_0",0);
- -->
- setprop("sim/model/ec130/antenna_left_flag_1",0);
- setprop("sim/model/ec130/antenna_left_flag_2",0);
- setprop("sim/model/ec130/antenna_left",1);
- </script>
- </binding>
- </radio>
- <radio>
- <row>0</row>
- <col>2</col>
- <halign>left</halign>
- <label> right</label>
- <property>sim/model/ec130/antenna_left_flag_1</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("sim/model/ec130/antenna_left_flag_0",0);
- <!--
- setprop("sim/model/ec130/antenna_left_flag_1",0);
- -->
- setprop("sim/model/ec130/antenna_left_flag_2",0);
- setprop("sim/model/ec130/antenna_left",0);
- </script>
- </binding>
- </radio>
- <radio>
- <row>0</row>
- <col>3</col>
- <halign>left</halign>
- <label> both</label>
- <property>sim/model/ec130/antenna_left_flag_2</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("sim/model/ec130/antenna_left_flag_0",0);
- setprop("sim/model/ec130/antenna_left_flag_1",0);
- <!--
- setprop("sim/model/ec130/antenna_left_flag_2",0);
- -->
- setprop("sim/model/ec130/antenna_left",2);
- </script>
- </binding>
- </radio>
- </group>
- <group>
- <layout>table</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <!-- only to get a empty line before next -->
- <text>
- <row>1</row>
- <col>0</col>
- <label> --------------</label>
- <halign>left</halign>
- </text>
- </group>
- <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> VOR/GLS Antenna</label>
- <property>/sim/model/ec130/vor_2_roof</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- </checkbox>
- <checkbox>
- <row>1</row>
- <col>1</col>
- <halign>left</halign>
- <label> ADF Antenna</label>
- <property>/sim/model/ec130/adf_roof</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- </checkbox>
- <checkbox>
- <row>2</row>
- <col>1</col>
- <halign>left</halign>
- <label> ADF Antenna left</label>
- <property>/sim/model/ec130/adf_roof_l</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- </checkbox>
- <!-- only to get a gap before next -->
- <text>
- <row>3</row>
- <col>0</col>
- <label> </label>
- <halign>left</halign>
- </text>
- </group>
- <hrule/>
- <group>
- <layout>table</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <text>
- <row>0</row>
- <col>0</col>
- <label> </label>
- <halign>left</halign>
- </text>
- <text>
- <row>1</row>
- <col>0</col>
- <label> Floor:</label>
- <halign>left</halign>
- </text>
- </group>
- <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> GPS/ADF Antenna</label>
- <property>/sim/model/ec130/adf_bottom</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- </checkbox>
- <!-- only to get a gap before next -->
- <text>
- <row>1</row>
- <col>0</col>
- <label> </label>
- <halign>left</halign>
- </text>
- </group>
- <!-- END left column -->
- </group>
- <vrule/>
- <!-- BEGIN right column -->
- <group>
- <layout>vbox</layout>
- <default-padding>0</default-padding>
- <halign>left</halign>
- <group>
- <layout>table</layout>
- <default-padding>5</default-padding>
- <halign>left</halign>
- <text>
- <row>0</row>
- <col>0</col>
- <label> Tail Antennas:</label>
- <halign>left</halign>
- </text>
- </group>
- <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> Radio front</label>
- <property>/sim/model/ec130/antenna_tail_front</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- </checkbox>
- <checkbox>
- <row>1</row>
- <col>1</col>
- <halign>left</halign>
- <label> V/UHF front</label>
- <property>/sim/model/ec130/VUHF_front</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("sim/model/ec130/VUHF",0);
- if ( getprop("sim/model/ec130/antenna_square_tail") == 1 ) {
- setprop("sim/model/ec130/antenna_square_tail",0);
- setprop("sim/model/ec130/antenna_square_tail_flag_0",0);
- }
- </script>
- </binding>
- </checkbox>
- <checkbox>
- <row>2</row>
- <col>1</col>
- <halign>left</halign>
- <label> V/UHF rear</label>
- <property>/sim/model/ec130/VUHF</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("sim/model/ec130/VUHF_front",0);
- setprop("sim/model/ec130/DME_small",0);
- </script>
- </binding>
- </checkbox>
- <checkbox>
- <row>3</row>
- <col>1</col>
- <halign>left</halign>
- <label> DME</label>
- <property>/sim/model/ec130/DME</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("sim/model/ec130/DME_small",0);
- if ( getprop("sim/model/ec130/antenna_square_tail") == 2 ) {
- setprop("sim/model/ec130/VUHF",0);
- setprop("sim/model/ec130/antenna_square_tail",0);
- setprop("sim/model/ec130/antenna_square_tail_flag_1",0);
- }
- </script>
- </binding>
- </checkbox>
- <checkbox>
- <row>4</row>
- <col>1</col>
- <halign>left</halign>
- <label> DME small</label>
- <property>/sim/model/ec130/DME_small</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- setprop("sim/model/ec130/DME",0);
- setprop("sim/model/ec130/VUHF",0);
- </script>
- </binding>
- </checkbox>
- <checkbox>
- <row>5</row>
- <col>1</col>
- <halign>left</halign>
- <label> Square Flat front </label>
- <property>/sim/model/ec130/antenna_square_tail_flag_0</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- if ( getprop("sim/model/ec130/antenna_square_tail_flag_0") ) {
- setprop("sim/model/ec130/antenna_square_tail_flag_1",0);
- setprop("sim/model/ec130/antenna_square_tail",1);
- setprop("sim/model/ec130/VUHF_front",0);
- } else {
- if ( !getprop("sim/model/ec130/antenna_square_tail_flag_1") ) {
- setprop("sim/model/ec130/antenna_square_tail",0);
- }
- }
- </script>
- </binding>
- </checkbox>
- <checkbox>
- <row>6</row>
- <col>1</col>
- <halign>left</halign>
- <label> Square Flat rear</label>
- <property>/sim/model/ec130/antenna_square_tail_flag_1</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- if ( getprop("sim/model/ec130/antenna_square_tail_flag_1") ) {
- setprop("sim/model/ec130/antenna_square_tail_flag_0",0);
- setprop("sim/model/ec130/antenna_square_tail",2);
- setprop("sim/model/ec130/DME",0);
- setprop("sim/model/ec130/antenna_flat_tail",0);
- } else {
- if ( !getprop("sim/model/ec130/antenna_square_tail_flag_0") ) {
- setprop("sim/model/ec130/antenna_square_tail",0);
- }
- }
- </script>
- </binding>
- </checkbox>
- <checkbox>
- <row>7</row>
- <col>1</col>
- <halign>left</halign>
- <label> ADF</label>
- <property>/sim/model/ec130/antenna_flat_tail</property>
- <live>true</live>
- <binding>
- <command>dialog-apply</command>
- </binding>
- <binding>
- <command>nasal</command>
- <script>
- if ( getprop("sim/model/ec130/antenna_square_tail") == 2 ) {
- setprop("sim/model/ec130/antenna_square_tail",0);
- setprop("sim/model/ec130/antenna_square_tail_flag_1",0);
- }
- </script>
- </binding>
- </checkbox>
- <!-- only to get a gap before next -->
- <text>
- <row>8</row>
- <col>0</col>
- <label> </label>
- <halign>left</halign>
- </text>
- </group>
- <!-- END right column -->
- </group>
- <!-- END box with 2 columns left/right -->
- </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>
- if ( getprop("/sim/model/ec130/config_dialog_active") ) {
- ec130.config_dialog.toggle();
- }
- ec130.antenna_config_dialog.toggle();
- setprop("/sim/model/ec130/antenna_dialog_active",0);
- </script>
- </binding>
- </button>
- </group>
- </PropertyList>
|