<?xml version="1.0"?>

<PropertyList>

	<path>takeoff.ac</path>
	
	<!-- mCDU Display Brightness -->
	
	<animation>
		<type>material</type>
		<object-name>perf</object-name>
		<emission>
			<red>1</red>
			<green>1</green>
			<blue>1</blue>
			<factor-prop>/instrumentation/mcdu/brt</factor-prop>
		</emission>
	</animation>
	
	<animation>
		<type>material</type>
		<object-name>rwy</object-name>
		<emission>
			<red>0</red>
			<green>0.37</green>
			<blue>0</blue>
			<factor-prop>/instrumentation/mcdu/brt</factor-prop>
		</emission>
		<diffuse>
			<red>0</red>
			<green>0.37</green>
			<blue>0</blue>
		</diffuse>
	</animation>
	
	<animation>
		<type>material</type>
		<object-name>v1</object-name>
		<object-name>vr</object-name>
		<object-name>v2</object-name>
		<object-name>trans-alt</object-name>
		<object-name>thr-red-acc</object-name>
		<object-name>flex-to-temp</object-name>
		<emission>
			<red>0</red>
			<green>0.4823</green>
			<blue>0.5372</blue>
			<factor-prop>/instrumentation/mcdu/brt</factor-prop>
		</emission>
		<diffuse>
			<red>0</red>
			<green>0.4823</green>
			<blue>0.5372</blue>
		</diffuse>
	</animation>
	
	<!-- Button Pick Animations -->
	
	<animation>
		<type>pick</type>
		<object-name>l1</object-name>
		<action>
			<button>0</button>
			<repeatable type="bool">false</repeatable>
			<binding>
				<command>nasal</command>
		 		<script>
		 		
		 			var input = getprop("/instrumentation/mcdu/input");
		 			
		 			setprop("/instrumentation/fmc/vspeeds/V1", input);
		 			
		 			setprop("/instrumentation/mcdu/input", "");
		 			
				</script>
            </binding>
        </action>
	</animation>
	
	<animation>
		<type>pick</type>
		<object-name>l2</object-name>
		<action>
            <button>0</button>
	   		<repeatable type="bool">false</repeatable>
            <binding>
				<command>nasal</command>
		 		<script>
		 		
		 			var input = getprop("/instrumentation/mcdu/input");
		 			
		 			setprop("/instrumentation/fmc/vspeeds/VR", input);
		 			
		 			setprop("/instrumentation/mcdu/input", "");
		 			
				</script>
            </binding>
        </action>
	</animation>
	
	<animation>
		<type>pick</type>
		<object-name>l3</object-name>
		<action>
            <button>0</button>
	   		<repeatable type="bool">false</repeatable>
            <binding>
				<command>nasal</command>
		 		<script>
		 		
		 			var input = getprop("/instrumentation/mcdu/input");
		 			
		 			setprop("/instrumentation/fmc/vspeeds/V2", input);
		 			
		 			setprop("/instrumentation/mcdu/input", "");
                    setprop("/flight-management/control/spd-ctrl", 'fmgc');
		 			
				</script>
            </binding>
        </action>
	</animation>
    
	<animation>
		<type>pick</type>
		<object-name>l4</object-name>
		<action>
			<button>0</button>
			<repeatable type="bool">false</repeatable>
			<binding>
				<command>nasal</command>
				<script>

					var input = getprop("/instrumentation/mcdu/input");
					if(size(input) == 0)
						input = 18000;

					setprop("/instrumentation/fmc/trans-alt", input);

					setprop("/instrumentation/mcdu/input", "");


				</script>
			</binding>
		</action>
	</animation>

	<animation>
		<type>pick</type>
		<object-name>l5</object-name>
		<action>
			<button>0</button>
			<repeatable type="bool">false</repeatable>
			<binding>
				<command>nasal</command>
				<script>

					var input = getprop("/instrumentation/mcdu/input");
					if(size(input) == 0){
						setprop("/flight-management/settings/acc-alt", 1500);
						setprop("/flight-management/settings/thr-red", 1500);
					} else {
						var alts = split('/', input);
						var thr_red = num(string.trim(alts[0]));
						if(thr_red != nil){
							if(thr_red > 0){
								var acc_alt = thr_red;
								if(size(alts) > 1)
									acc_alt = num(string.trim(alts[1]));
								if(acc_alt == nil or !acc_alt) acc_alt = thr_red;
								setprop("/flight-management/settings/acc-alt", acc_alt);
								setprop("/flight-management/settings/thr-red", thr_red);
							}
						}
					}

					setprop("/instrumentation/mcdu/input", "");


				</script>
			</binding>
		</action>
	</animation>
	
	<animation>
		<type>pick</type>
		<object-name>r6</object-name>
		<action>
            <button>0</button>
	   		<repeatable type="bool">false</repeatable>
            <binding>
				<command>nasal</command>
		 		<script>
		 		
		 			setprop("/instrumentation/mcdu/page", "perf-clb");
		 			
				</script>
            </binding>
        </action>
	</animation>
    
    <animation>
        <type>pick</type>
        <object-name>r4</object-name>
        <action>
            <button>0</button>
            <repeatable type="bool">false</repeatable>
            <binding>
                <command>nasal</command>
                <script>

                    var input = getprop("/instrumentation/mcdu/input");
                    if(size(input) == 0)
                        input = -999;

                    setprop("/instrumentation/fmc/flex-to-temp", input);

                    setprop("/instrumentation/mcdu/input", "");


                </script>
            </binding>
        </action>
    </animation>
	
	<animation>
		<type>select</type>
		<object-name>v1</object-name>
		<condition>
			<not>
				<equals>
					<property>/instrumentation/fmc/vspeeds/V1</property>
					<value>0</value>
				</equals>
			</not>
		</condition>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>v1-empty</object-name>
		<condition>
			<equals>
				<property>/instrumentation/fmc/vspeeds/V1</property>
				<value>0</value>
			</equals>
		</condition>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>vr</object-name>
		<condition>
			<not>
				<equals>
					<property>/instrumentation/fmc/vspeeds/VR</property>
					<value>0</value>
				</equals>
			</not>
		</condition>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>vr-empty</object-name>
		<condition>
			<equals>
				<property>/instrumentation/fmc/vspeeds/VR</property>
				<value>0</value>
			</equals>
		</condition>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>v2</object-name>
		<condition>
			<not>
				<equals>
					<property>/instrumentation/fmc/vspeeds/V2</property>
					<value>0</value>
				</equals>
			</not>
		</condition>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>v2-empty</object-name>
		<condition>
			<equals>
				<property>/instrumentation/fmc/vspeeds/V2</property>
				<value>0</value>
			</equals>
		</condition>
	</animation>
    
    <animation>
        <type>select</type>
        <object-name>flex-to-temp</object-name>
        <condition>
            <greater-than>
                <property>/instrumentation/fmc/flex-to-temp</property>
                <value>-100</value>
            </greater-than>
        </condition>
    </animation>
	
	<text>
		<name>v1</name>
		<offsets>
			<x-m>-0.0694</x-m>
			<y-m>-0.0416</y-m>
			<z-m>-0.0006</z-m>
			<heading-deg>90</heading-deg>
		</offsets>
		<alignment>left-center</alignment>
		<axis-alignment>xy-plane</axis-alignment>
		<type type="string">number-value</type>
		<format type="string">%3.0f</format>
		<property>/instrumentation/fmc/vspeeds/V1</property>
		<truncate type="bool">false</truncate>
		<font type="string">courier-bold.txf</font>
		<draw-text type="bool">true</draw-text>
		<draw-alignment type="bool">false</draw-alignment>
		<draw-boundingbox type="bool">false</draw-boundingbox>
		<character-size>0.003</character-size>
		<font-resolution>
			<width type="int">32</width>
			<height type="int">32</height>
		</font-resolution>
	</text>
	
	<text>
		<name>vr</name>
		<offsets>
			<x-m>-0.0608</x-m>
			<y-m>-0.0416</y-m>
			<z-m>-0.0006</z-m>
			<heading-deg>90</heading-deg>
		</offsets>
		<alignment>left-center</alignment>
		<axis-alignment>xy-plane</axis-alignment>
		<type type="string">number-value</type>
		<format type="string">%3.0f</format>
		<property>/instrumentation/fmc/vspeeds/VR</property>
		<truncate type="bool">false</truncate>
		<font type="string">courier-bold.txf</font>
		<draw-text type="bool">true</draw-text>
		<draw-alignment type="bool">false</draw-alignment>
		<draw-boundingbox type="bool">false</draw-boundingbox>
		<character-size>0.003</character-size>
		<font-resolution>
			<width type="int">32</width>
			<height type="int">32</height>
		</font-resolution>
	</text>
	
	<text>
		<name>v2</name>
		<offsets>
			<x-m>-0.0520</x-m>
			<y-m>-0.0416</y-m>
			<z-m>-0.0006</z-m>
			<heading-deg>90</heading-deg>
		</offsets>
		<alignment>left-center</alignment>
		<axis-alignment>xy-plane</axis-alignment>
		<type type="string">number-value</type>
		<format type="string">%3.0f</format>
		<property>/instrumentation/fmc/vspeeds/V2</property>
		<truncate type="bool">false</truncate>
		<font type="string">courier-bold.txf</font>
		<draw-text type="bool">true</draw-text>
		<draw-alignment type="bool">false</draw-alignment>
		<draw-boundingbox type="bool">false</draw-boundingbox>
		<character-size>0.003</character-size>
		<font-resolution>
			<width type="int">32</width>
			<height type="int">32</height>
		</font-resolution>
	</text>
    
	<text>
		<name>trans-alt</name>
		<offsets>
			<x-m>-0.0427</x-m>
			<y-m>-0.0416</y-m>
			<z-m>-0.0006</z-m>
			<heading-deg>90</heading-deg>
		</offsets>
		<alignment>left-center</alignment>
		<axis-alignment>xy-plane</axis-alignment>
		<type type="string">number-value</type>
		<format type="string">%5.0f</format>
		<property>/instrumentation/fmc/trans-alt</property>
		<truncate type="bool">false</truncate>
		<font type="string">courier-bold.txf</font>
		<draw-text type="bool">true</draw-text>
		<draw-alignment type="bool">false</draw-alignment>
		<draw-boundingbox type="bool">false</draw-boundingbox>
		<character-size>0.003</character-size>
		<font-resolution>
			<width type="int">32</width>
			<height type="int">32</height>
		</font-resolution>
	</text>

	<text>
		<name>thr-red-acc</name>
		<offsets>
			<x-m>-0.0339</x-m>
			<y-m>-0.0416</y-m>
			<z-m>-0.0006</z-m>
			<heading-deg>90</heading-deg>
		</offsets>
		<alignment>left-center</alignment>
		<axis-alignment>xy-plane</axis-alignment>
		<type type="string">text-value</type>
		<format type="string">%s</format>
		<property>/instrumentation/fmc/thr-red-acc</property>
		<truncate type="bool">false</truncate>
		<font type="string">courier-bold.txf</font>
		<draw-text type="bool">true</draw-text>
		<draw-alignment type="bool">false</draw-alignment>
		<draw-boundingbox type="bool">false</draw-boundingbox>
		<character-size>0.003</character-size>
		<font-resolution>
			<width type="int">32</width>
			<height type="int">32</height>
		</font-resolution>
	</text>
	
	<text>
		<name>rwy</name>
		<offsets>
			<x-m>-0.0692</x-m>
			<y-m>0.0397</y-m>
			<z-m>-0.0006</z-m>
			<heading-deg>90</heading-deg>
		</offsets>
		<alignment>right-center</alignment>
		<axis-alignment>xy-plane</axis-alignment>
		<type type="string">text-value</type>
		<format type="string">%s</format>
		<property>/autopilot/route-manager/departure/runway</property>
		<truncate type="bool">false</truncate>
		<font type="string">courier-bold.txf</font>
		<draw-text type="bool">true</draw-text>
		<draw-alignment type="bool">false</draw-alignment>
		<draw-boundingbox type="bool">false</draw-boundingbox>
		<character-size>0.003</character-size>
		<font-resolution>
			<width type="int">32</width>
			<height type="int">32</height>
		</font-resolution>
	</text>
    
    <text>
        <name>flex-to-temp</name>
        <offsets>
            <x-m>-0.0427</x-m>
            <y-m>0.0377</y-m>
            <z-m>-0.0006</z-m>
            <heading-deg>90</heading-deg>
        </offsets>
        <alignment>right-center</alignment>
        <axis-alignment>xy-plane</axis-alignment>
        <type type="string">number-value</type>
        <format type="string">%3.0f</format>
        <property>/instrumentation/fmc/flex-to-temp</property>
        <truncate type="bool">false</truncate>
        <font type="string">courier-bold.txf</font>
        <draw-text type="bool">true</draw-text>
        <draw-alignment type="bool">false</draw-alignment>
        <draw-boundingbox type="bool">false</draw-boundingbox>
        <character-size>0.0025</character-size>
        <font-resolution>
            <width type="int">32</width>
            <height type="int">32</height>
        </font-resolution>
    </text>
	
</PropertyList>