<?xml version="1.0"?>

<PropertyList>
  <name>Lockheed1049h-menu</name>
  <modal>false</modal>
  <layout>vbox</layout>

  <text>
    <label>Constellation menu</label>
  </text>

  <hrule><dummy/></hrule>

  <group>
    <layout>hbox</layout>
    <empty><stretch>true</stretch></empty>

    <button>
      <legend>Radio</legend>
      <key>r</key>
      <binding>
       <command>dialog-show</command>
       <dialog-name>Lockheed1049h-radios</dialog-name>
      </binding>
      <binding>
        <command>dialog-close</command>
      </binding>
    </button>

    <button>
      <legend>Help</legend>
      <key>h</key>
      <binding>
       <command>nasal</command>
       <script>gui.showHelpDialog("/sim/help")</script>
      </binding>
      <binding>
        <command>dialog-close</command>
      </binding>
    </button>

    <empty><stretch>true</stretch></empty>
  </group>

  <text>
    <label></label>
  </text>

  <group>
    <layout>hbox</layout>
    <text>
      <halign>left</halign>
      <label>  Crew Door, check to open:</label>
    </text>
    <checkbox>
      <property>/controls/door-crew/position-norm</property>
      <binding>
        <command>nasal</command>
        <script>Lockheed1049h.door_crew.toggle()</script>
      </binding>
    </checkbox>
  </group>

  <text>
    <label></label>
  </text>

  <group>
    <layout>hbox</layout>
    <text>
      <label>Preset Tank Levels: </label>
      <halign>left</halign>
    </text>
    <combo>
      <pref-width>200</pref-width>
      <property>/systems/fuel/tanks/dialog-preset</property>
      <value>casual flying</value>
      <value>max landing</value>
      <value>max takeoff</value>
      <value>empty</value>
    </combo>
  </group>

  <group>
    <layout>hbox</layout>
    <empty><stretch>true</stretch></empty>

    <button>
      <legend>Apply Selection</legend>
      <binding>
        <command>dialog-apply</command>
      </binding>
      <binding>
        <command>nasal</command>
        <script>Lockheed1049h.preset_select();</script>
      </binding>
      <binding>
        <command>dialog-close</command>
      </binding>
    </button>

    <empty><stretch>true</stretch></empty>
  </group>

  <text>
    <label></label>
  </text>



  <text>
    <halign>left</halign>
    <label>  Captain's Seat and View Preferences:</label>
  </text>
  
  <group>
    <layout>table</layout>
  
    <empty>
      <row>0</row>
      <col>0</col>
      <pref-width>10</pref-width>
    </empty>
  
    <text>
      <row>0</row>
      <col>1</col>
      <halign>left</halign>
      <label>Seat: Down-Up</label>
    </text>
  
    <slider>
      <row>0</row>
      <col>2</col>
      <property>/sim/current-view/y-offset-m</property>
      <binding>
        <condition>
          <equals>
            <property>sim/current-view/view-number</property>
            <value>0</value>
          </equals>
        </condition>
        <command>dialog-apply</command>
      </binding>
      <binding>
        <condition>
          <equals>
            <property>sim/current-view/view-number</property>
            <value>0</value>
          </equals>
        </condition>
        <command>nasal</command>
        <script>Lockheed1049h.seat_pilot_update();</script>
      </binding>
      <min>1.14</min>
      <max>1.34</max>
    </slider>
  
    <empty>
      <row>1</row>
      <col>0</col>
      <pref-width>10</pref-width>
    </empty>
  
    <text>
      <row>1</row>
      <col>1</col>
      <halign>left</halign>
      <label>Seat: Forward-Back</label>
    </text>
  
    <slider>
      <row>1</row>
      <col>2</col>
      <property>/sim/current-view/z-offset-m</property>
      <binding>
        <condition>
          <equals>
            <property>sim/current-view/view-number</property>
            <value>0</value>
          </equals>
        </condition>
        <command>dialog-apply</command>
      </binding>
      <binding>
        <condition>
          <equals>
            <property>sim/current-view/view-number</property>
            <value>0</value>
          </equals>
        </condition>
        <command>nasal</command>
        <script>Lockheed1049h.seat_pilot_update();</script>
      </binding>
      <min>2.79</min>
      <max>2.99</max>
    </slider>
  

    <empty>
      <row>2</row>
      <col>0</col>
      <pref-width>10</pref-width>
    </empty>
  
    <text>
      <row>2</row>
      <col>1</col>
      <halign>left</halign>
      <label>View: Look Down-Up</label>
    </text>
  
    <slider>
      <row>2</row>
      <col>2</col>
      <property>/sim/current-view/pitch-offset-deg</property>
      <binding>
        <condition>
          <equals>
            <property>sim/current-view/view-number</property>
            <value>0</value>
          </equals>
        </condition>
        <command>dialog-apply</command>
      </binding>
      <binding>
        <condition>
          <equals>
            <property>sim/current-view/view-number</property>
            <value>0</value>
          </equals>
        </condition>
        <command>nasal</command>
        <script>Lockheed1049h.seat_pilot_update();</script>
      </binding>
      <min>-15</min>
      <max>0</max>
    </slider>
  
  </group>

  <group>
    <layout>hbox</layout>
    <empty><stretch>true</stretch></empty>

    <button>
      <legend>Reset to Defaults</legend>
      <binding>
        <condition>
          <equals>
            <property>sim/current-view/view-number</property>
            <value>0</value>
          </equals>
        </condition>
        <command>nasal</command>
        <script>Lockheed1049h.seat_pilot_defaults();</script>
      </binding>
      <binding>
        <command>dialog-update</command>
      </binding>
    </button>

    <empty><stretch>true</stretch></empty>
  </group>


  <text>
    <label></label>
  </text>

  <text>
    <label>Fuel and seat settings saved on Flightgear exit.</label>
  </text>

  <group>
    <layout>hbox</layout>
    <empty><stretch>true</stretch></empty>

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

    <empty><stretch>true</stretch></empty>
  </group>
</PropertyList>
