<?xml version="1.0" encoding="utf-8"?>

<PropertyList>

  <path>ap.ac</path>
  <animation>
    <!-- object name in ac file -->
    <object-name>ap.label</object-name>
    <object-name>ap.pa</object-name>
    <object-name>ap.pa-alt</object-name>
    <object-name>ap.pa-alt-on</object-name>
    <object-name>ap.pa-app</object-name>
    <object-name>ap.pa-app-on</object-name>
    <object-name>ap.pa-hdg</object-name>
    <object-name>ap.pa-hdg-on</object-name>
    <object-name>ap.pa-nav</object-name>
    <object-name>ap.pa-nav-on</object-name>
    <object-name>ap.pa-on</object-name>
    <object-name>ap.pa-pitch</object-name>
    <object-name>ap.pa-spd</object-name>
    <object-name>ap.pa-spd-on</object-name>
    <object-name>ap.pa-stby</object-name>
    <object-name>ap.pa-stby-on</object-name>
    <object-name>ap.pa-vs</object-name>
    <object-name>ap.pa-vs-on</object-name>
  </animation>

  <animation>
    <!-- lights : illuminations -->
    <type>material</type>
    <object-name>ap.label</object-name>
    <emission>
      <factor-prop>/systems/electrical/outputs/instrument-lights</factor-prop>
      <red>   0.1 </red>
      <green> 0.5 </green>
      <blue>  0.2 </blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>ap.pa</object-name>
    <object-name>ap.pa-alt</object-name>
    <object-name>ap.pa-vs</object-name>
    <object-name>ap.pa-nav</object-name>
    <object-name>ap.pa-spd</object-name>
    <object-name>ap.pa-app</object-name>
    <object-name>ap.pa-stby</object-name>
    <object-name>ap.pa-hdg</object-name>
    <object-name>ap.pa-on</object-name>
    <object-name>ap.pa-alt-on</object-name>
    <object-name>ap.pa-vs-on</object-name>
    <object-name>ap.pa-nav-on</object-name>
    <object-name>ap.pa-spd-on</object-name>
    <object-name>ap.pa-app-on</object-name>
    <object-name>ap.pa-stby-on</object-name>
    <object-name>ap.pa-hdg-on</object-name>
    <emission>
      <factor-prop>/systems/electrical/outputs/instrument-lights</factor-prop>
      <red>   0.6 </red>
      <green> 0.5 </green>
      <blue>  0.5 </blue>
    </emission>
  </animation>

  <animation>
    <type>select</type>
    <object-name>ap.pa-on</object-name>
    <condition>
      <or>
        <equals>
          <property>autopilot/locks/AP-status</property>
          <value>AP1</value>
        </equals>
        <and>
          <equals>
            <property>autopilot/locks/AP-status</property>
            <value>TEMP DISENGAGE</value>
          </equals>
          <equals>
            <property>sim/model/lights/pa-blink/state</property>
            <value>true</value>
          </equals>
        </and>
      </or>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>ap.pa-stby-on</object-name>
    <condition>
      <and>
        <equals>
          <property>autopilot/locks/heading</property>
          <value>ROLL</value>
        </equals>
        <equals>
          <property>autopilot/locks/altitude</property>
          <value>PTCH</value>
        </equals>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>ap.pa-hdg-on</object-name>
    <condition>
      <equals>
        <property>autopilot/locks/heading</property>
        <value>HDG</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>ap.pa-nav-on</object-name>
    <condition>
      <or>
        <equals>
          <property>autopilot/locks/heading</property>
          <value>LNAV</value>
        </equals>
        <equals>
          <property>autopilot/locks/heading</property>
          <value>VOR</value>
        </equals>
        <equals>
          <property>autopilot/locks/heading</property>
          <value>LOC</value>
        </equals>
        <equals>
          <property>autopilot/locks/heading-arm</property>
          <value>VOR</value>
        </equals>
        <equals>
          <property>autopilot/locks/heading-arm</property>
          <value>LOC</value>
        </equals>
      </or>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>ap.pa-app-on</object-name>
    <condition>
      <or>
        <equals>
          <property>autopilot/locks/altitude-arm</property>
          <value>GS</value>
        </equals>
        <equals>
          <property>autopilot/locks/altitude</property>
          <value>GS</value>
        </equals>
      </or>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>ap.pa-alt-on</object-name>
    <condition>
      <or>
        <equals>
          <property>autopilot/locks/altitude</property>
          <value>ALT</value>
        </equals>
        <and>
          <equals>
            <property>autopilot/locks/altitude</property>
            <value>TF</value>
          </equals>
          <property>sim/model/lights/pa-blink/state</property>
        </and>
      </or>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>ap.pa-vs-on</object-name>
    <condition>
      <equals>
        <property>autopilot/locks/altitude</property>
        <value>VS</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>ap.pa-spd-on</object-name>
    <condition>
      <equals>
        <property>autopilot/locks/speed</property>
        <value>SPD</value>
      </equals>
    </condition>
  </animation>

  <!--BOUTONS-->
  <animation>
    <type>pick</type>
    <object-name>ap.pa-hdg</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("hdg")</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-alt</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("alt")</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-nav</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("nav")</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-app</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("app")</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-vs</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("vs")</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-stby</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("stby")</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-pitch</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.pitch_wheel(-1)</script>
      </binding>
    </action>
    <action>
      <button>1</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.pitch_wheel(1)</script>
      </binding>
    </action>
    <action>
      <button>3</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.pitch_wheel(-1)</script>
      </binding>
    </action>
    <action>
      <button>4</button>
      <repeatable>true</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.pitch_wheel(1)</script>
      </binding>
    </action>
  </animation>

  <!--animation>
    <type>rotate</type>
    <object-name>ap.pa-pitch</object-name>
    <property>autopilot/settings/target-pitch-deg</property>
    <factor>10</factor>
    <center>
      <x-m>-3.5463</x-m>
      <y-m>-0.161</y-m>
      <z-m>-0.21373</z-m>
    </center>
    <axis>
      <x>0</x>
      <y>1</y>
      <z>0</z>
    </axis>
  </animation-->

  <animation>
    <type>pick</type>
    <object-name>ap.pa</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("ap");</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-spd</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("spd");</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-spd</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>property-toggle</command>
        <property>sim/model/click</property>
      </binding>
      <binding>
        <command>nasal</command>
        <script>mirage2000.FD_set_mode("spd");</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa</object-name>
    <object-name>ap.pa-on</object-name>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>enable_autopilot</tooltip-id>
        <label>Enable Autopilot</label>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-alt</object-name>
    <object-name>ap.pa-alt-on</object-name>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>Altitute_autopilot</tooltip-id>
        <label>Altitude</label>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-vs</object-name>
    <object-name>ap.pa-vs-on</object-name>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>vertivalSpeed_autopilot</tooltip-id>
        <label>Vertical Speed</label>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-hdg</object-name>
    <object-name>ap.pa-hdg-on</object-name>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>heading_autopilot</tooltip-id>
        <label>Heading Bug</label>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-spd</object-name>
    <object-name>ap.pa-spd-on</object-name>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>speed_autopilot</tooltip-id>
        <label>Speed</label>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-nav</object-name>
    <object-name>ap.pa-nav-on</object-name>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>nav_autopilot</tooltip-id>
        <label>Navigation : %s</label>
        <property>autopilot/settings/nav-source</property>
      </binding>
    </hovered>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>ap.pa-pitch</object-name>
    <hovered>
      <binding>
        <command>set-tooltip</command>
        <tooltip-id>nav_autopilot</tooltip-id>
        <label>Pitch : %3d</label>
        <property>autopilot/settings/target-pitch-deg</property>
      </binding>
    </hovered>
  </animation>


  <!--
================================================================================
                                                                        TEXT OSG
================================================================================
  -->
  <text>
    <name>ap.textosg</name>
    <type type="string">literal</type>
    <text type="string">Autopilot</text>
    <draw-text type="bool">true</draw-text>
    <font>Helvetica.txf</font>
    <character-size type="double">0.016</character-size>
    <character-aspect-ratio type="double">1.0</character-aspect-ratio>
    <axis-alignment>yz-plane</axis-alignment>
    <max-height>0.06</max-height>
    <max-width>0.08</max-width>
    <font-resolution>
      <width type="int">64</width>
      <height type="int">64</height>
    </font-resolution>
    <alignment>center-center</alignment>
    <offsets>
      <x-m>-3.48</x-m>
      <y-m>-.2</y-m>
      <z-m>-.2</z-m>
    </offsets>
  </text>

  <animation>
    <type>material</type>
    <object-name>ap.textosg</object-name>
    <emission>
      <red>1</red>
      <green>0.2</green>
      <blue>0.2</blue>
    </emission>
  </animation>
  <animation>
    <type>select</type>
    <object-name>ap.textosg</object-name>
    <condition>
      <property>sim/panel-hotspots</property>
    </condition>
  </animation>

</PropertyList>
