<?xml version="1.0"?>

<!-- Copyright (c) 2022 Josh Davidson (Octal450) -->

<PropertyList>
	
	<path>ai.ac</path>
	
	<animation>
		<type>material</type>
		<object-name>turn</object-name>
		<object-name>disc</object-name>
		<object-name>flag</object-name>
		<object-name>ac</object-name>
		<object-name>bg</object-name>
		<emission>
			<red>0.6</red>
			<green>0.6</green>
			<blue>0.6</blue>
			<factor-prop>controls/lighting/panel-norm</factor-prop>
		</emission>
	</animation>
	
	<animation>
		<type>select</type>
		<object-name>flag</object-name>
		<condition>
			<less-than>
				<property>instrumentation/attitude-indicator/spin</property>
				<value>0.5</value>
			</less-than>
		</condition>
	</animation>
	
	<animation>
		<type>rotate</type>
		<object-name>turn</object-name>
		<object-name>disc</object-name>
		<property>instrumentation/attitude-indicator/indicated-roll-deg-actual</property>
		<factor>-1</factor>
		<axis>
			<x>-1</x>
			<y>0</y>
			<z>0</z>
		</axis>
		<center>
			<x-m>0</x-m>
			<y-m>0</y-m>
			<z-m>0</z-m>
		</center>
	</animation>
	
	<animation>
		<type>translate</type>
		<object-name>disc</object-name>
		<property>instrumentation/attitude-indicator/indicated-pitch-deg-actual</property>
		<factor>-0.00042</factor>
		<axis>
			<x>0</x>
			<y>0</y>
			<z>1</z>
		</axis>
	</animation>
	
	<animation>
		<type>translate</type>
		<object-name>ac</object-name>
		<property>instrumentation/attitude-indicator/pitch-offset-deg</property>
		<factor>0.00042</factor>
		<axis>
			<x>0</x>
			<y>0</y>
			<z>1</z>
		</axis>
	</animation>
	
	<animation>
		<type>rotate</type>
		<object-name>offset.knob</object-name>
		<property>instrumentation/attitude-indicator/pitch-offset-deg</property>
		<factor>-12</factor>
		<center>
			<z-m>-0.032829</z-m>
		</center>
		<axis>
			<x>1</x>
			<y>0</y>
			<z>0</z>
		</axis>
	</animation>
	
	<animation>
		<type>pick</type>
		<object-name>offset.knob</object-name>
		<action>
			<button>0</button>
			<button>3</button>
			<repeatable>true</repeatable>
			<binding>
				<command>property-adjust</command>
				<property>instrumentation/attitude-indicator/pitch-offset-deg</property>
				<step>0.5</step>
				<min>-5</min>
				<max>5</max>
				<wrap>false</wrap>
			</binding>
		</action>
		<action>
			<button>1</button>
			<button>4</button>
			<repeatable>true</repeatable>
			<binding>
				<command>property-adjust</command>
				<property>instrumentation/attitude-indicator/pitch-offset-deg</property>
				<step>-0.5</step>
				<min>-5</min>
				<max>5</max>
				<wrap>false</wrap>
			</binding>
		</action>
		<hovered>
			<binding>
				<command>set-tooltip</command>
				<tooltip-id>ai-offset</tooltip-id>
				<label>Horizon Offset: %1.1f</label>
				<property>instrumentation/attitude-indicator/pitch-offset-deg</property>
			</binding>
		</hovered>
	</animation>

</PropertyList>
