<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <name>config</name>
  <modal>false</modal>
  <layout>vbox</layout>
  <padding>80</padding>

  <group>
    <layout>hbox</layout>
    <empty>
      <stretch>1</stretch>
    </empty>
    <text>
      <label>Robin DR400 options</label>
    </text>
    <empty>
      <stretch>1</stretch>
    </empty>
    <button>
      <pref-width>16</pref-width>
      <pref-height>16</pref-height>
      <legend></legend>
      <keynum>27</keynum>
      <border>2</border>
      <binding>
        <command>dialog-close</command>
      </binding>
    </button>
  </group>

  <hrule/>

  <group>
    <halign>center</halign>
    <layout>hbox</layout>

    <group>
      <layout>vbox</layout>

      <group>
        <layout>hbox</layout>
        <text>
          <label>Display</label>
          <halign>left</halign>
        </text>
        <hrule>
          <stretch>true</stretch>
        </hrule>
      </group>

      <checkbox>
        <halign>left</halign>
        <label>Show/Hide Yokes</label>
        <!-- <property>sim/model/config/show-yokes</property> -->
        <property>sim/multiplay/generic/bool[7]</property>
        <binding>
          <command>property-toggle</command>
          <!-- <property>sim/model/config/show-yokes</property> -->
          <property>sim/multiplay/generic/bool[7]</property>
        </binding>
      </checkbox>

      <checkbox>
        <halign>left</halign>
        <label>Show/Hide Copilot</label>
        <!-- <property>sim/model/config/show-copilot</property> -->
        <property>sim/multiplay/generic/bool[8]</property>
        <binding>
          <command>property-toggle</command>
          <!-- <property>sim/model/config/show-copilot</property> -->
          <property>sim/multiplay/generic/bool[8]</property>
        </binding>
      </checkbox>

      <checkbox>
        <halign>left</halign>
        <label>Details High On/Off</label>
        <!-- <property>sim/model/config/details-high</property> -->
        <property>sim/multiplay/generic/bool[1]</property>
        <binding>
          <command>property-toggle</command>
          <!-- <property>sim/model/config/details-high</property> -->
          <property>sim/multiplay/generic/bool[1]</property>
        </binding>
      </checkbox>

    </group>

    <vrule/>

    <group>
      <layout>vbox</layout>

      <group>
        <layout>hbox</layout>
        <button>
          <legend>AutoStart/AutoStop</legend>
          <default>false</default>
          <binding>
            <command>property-toggle</command>
            <property>controls/electric/battery-switch</property>
          </binding>
          <binding>
            <command>property-toggle</command>
            <property>controls/electric/engine/generator</property>
          </binding>
          <binding>
            <command>property-toggle</command>
            <property>controls/lighting/instrument-lights</property>
          </binding>
          <binding>
            <command>property-toggle</command>
            <property>controls/lighting/nav-lights</property>
          </binding>
          <binding>
            <command>property-toggle</command>
            <property>controls/lighting/beacon</property>
          </binding>
          <binding>
            <command>property-toggle</command>
            <property>controls/lighting/strobe</property>
          </binding>
          <binding>
            <command>property-toggle</command>
            <property>controls/switches/starterkey-insert</property>
          </binding>
          <binding>
            <command>property-toggle</command>
            <property>controls/engines/engine[0]/fuel-pump</property>
          </binding>
          <binding>
            <command>property-toggle</command>
            <property>controls/engines/engine[1]/fuel-pump</property>
          </binding>
          <!-- Magnetos ON -->
          <binding>
            <condition>
              <property>controls/switches/starterkey-insert</property>
            </condition>
            <command>property-assign</command>
            <property>controls/engines/engine[0]/magnetos</property>
            <value>3</value>
          </binding>
          <!-- Magnetos OFF -->
          <binding>
            <condition>
              <not><property>controls/switches/starterkey-insert</property></not>
            </condition>
            <command>property-assign</command>
            <property>controls/engines/engine[0]/magnetos</property>
            <value>0</value>
          </binding>
          <binding>
            <command>nasal</command>
            <script>controls.startEngine(0,0)</script>
          </binding>
          <binding>
            <condition>
              <property>controls/switches/starterkey-insert</property>
            </condition>
            <command>nasal</command>
            <script>gui.popupTip("Press 's' to start")</script>
          </binding>
        </button>
      </group>

      <hrule/>

      <group>
        <layout>hbox</layout>
        <text>
          <label>Immatriculation</label>
          <halign>left</halign>
        </text>
      </group>

      <group>
        <layout>hbox</layout>
        <input>
          <!-- <property>sim/multiplay/callsign</property> -->
          <property>sim/multiplay/generic/string[0]</property>
          <type>STRING</type>
          <width>100</width>
          <binding>
            <command>nasal</command>
            <script>immat.refresh_immat();</script>
          </binding>
          <binding>
            <command>dialog-apply</command>
          </binding>
        </input>
      </group>

    </group>

  </group>

  <hrule/>

  <button>
    <legend>Close</legend>
    <default>true</default>
    <key>Esc</key>
    <binding>
      <command>dialog-apply</command>
    </binding>
    <binding>
      <command>dialog-close</command>
    </binding>
  </button>

  <nasal>
    <open></open>
  </nasal>

</PropertyList>
