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

<!-- FBW Dialog -->
<!-- Joshua Davidson (Octal450) -->

<PropertyList>

	<name>fbw</name>
	<layout>vbox</layout>

    <group>
        <layout>hbox</layout>
        <text>
            <halign>left</halign>
            <label>FBW Control</label>
        </text>
        <button>
            <halign>right</halign>
            <pref-width>20</pref-width>
            <pref-height>20</pref-height>
            <legend>X</legend>
            <key>Esc</key>
            <binding>
                <command>dialog-close</command>
            </binding>
        </button>
    </group>
	
    <hrule/>

	<group>
		<layout>hbox</layout>
		<button>
			<legend>TOGGLE FBW</legend>
            <pref-width>120</pref-width>
			<binding>
				<command>property-toggle</command>
				<property>/fdm/jsbsim/fbw/enable</property>
			</binding>
			<live>true</live>
		</button>
		<button>
			<legend>SWITCH MODE</legend>
            <pref-width>120</pref-width>
			<binding>
				<command>property-toggle</command>
				<property>/fdm/jsbsim/fbw/mode</property>
			</binding>
			<live>true</live>
		</button>
	</group>
	
	<group>
		<layout>table</layout>
		<empty>
			<row>0</row>
			<col>0</col>
		</empty>
		<text>
			<row>0</row>
			<col>1</col>
			<label>[ENABLED]</label>
			<visible>
				<equals>
					<property>/fdm/jsbsim/fbw/enable</property>
					<value>1</value>
				</equals>
			</visible>
		</text>
		<empty>
			<row>0</row>
			<col>2</col>
		</empty>
		<text>
			<row>0</row>
			<col>3</col>
			<label>[AIR/AIR MODE]</label>
			<visible>
				<equals>
					<property>/fdm/jsbsim/fbw/mode</property>
					<value>0</value>
				</equals>
			</visible>
		</text>
		<text>
			<row>0</row>
			<col>3</col>
			<label>[CHARGES MODE]</label>
			<visible>
				<equals>
					<property>/fdm/jsbsim/fbw/mode</property>
					<value>1</value>
				</equals>
			</visible>
		</text>
	</group>
	
	<group>
		<layout>vbox</layout>
		
		<group>
			<layout>hbox</layout>

			<hrule>
				<stretch type="bool">true</stretch>
			</hrule>
			<text>
				<label>Debugging</label>
			</text>
			<hrule>
				<stretch type="bool">true</stretch>
			</hrule>
		</group>
		
		<checkbox>
			<label>Disable Auto-Slat Control</label>
			<halign>left</halign>
			<live>true</live>
			<property>/fdm/jsbsim/fbw/man-slat</property>
			<binding>
				<command>dialog-apply</command>
			</binding>
		</checkbox>
		
		<checkbox>
			<label>Disable Yaw FBW Control Law</label>
			<halign>left</halign>
			<live>true</live>
			<property>/fdm/jsbsim/fbw/man-yaw</property>
			<binding>
				<command>dialog-apply</command>
			</binding>
		</checkbox>
		
		<group>
			<layout>hbox</layout>

			<hrule>
				<stretch type="bool">true</stretch>
			</hrule>
			<text>
				<label>Elevon</label>
			</text>
			<hrule>
				<stretch type="bool">true</stretch>
			</hrule>
		</group>
		
		<group>
			<layout>hbox</layout>
			
			<group>
				<layout>vbox</layout>
				
				<text>
					<label>1L: </label>
				</text>
				<slider>
					<row>2</row>
					<col>0</col>
					<pref-height>150</pref-height>
					<vertical>true</vertical>
					<property>/fdm/jsbsim/fcs/elevon-1L-pos-deg</property>
					<min>-25</min>
					<max>16</max>
					<step>0.0025</step>
					<live>true</live>
				</slider>
			</group>
				
			<group>
				<layout>vbox</layout>
		
				<text>
					<label>2L: </label>
				</text>
				<slider>
					<row>2</row>
					<col>0</col>
					<pref-height>150</pref-height>
					<vertical>true</vertical>
					<property>/fdm/jsbsim/fcs/elevon-2L-pos-deg</property>
					<min>-25</min>
					<max>16</max>
					<step>0.0025</step>
					<live>true</live>
				</slider>
			</group>
			
			<group>
				<layout>vbox</layout>
		
				<text>
					<label>2R: </label>
				</text>
				<slider>
					<row>2</row>
					<col>0</col>
					<pref-height>150</pref-height>
					<vertical>true</vertical>
					<property>/fdm/jsbsim/fcs/elevon-2R-pos-deg</property>
					<min>-25</min>
					<max>16</max>
					<step>0.0025</step>
					<live>true</live>
				</slider>
			</group>
			
			<group>
				<layout>vbox</layout>
				
				<text>
					<label>1R: </label>
				</text>
				<slider>
					<row>2</row>
					<col>0</col>
					<pref-height>150</pref-height>
					<vertical>true</vertical>
					<property>/fdm/jsbsim/fcs/elevon-1R-pos-deg</property>
					<min>-25</min>
					<max>16</max>
					<step>0.0025</step>
					<live>true</live>
				</slider>
			</group>
		</group>
		
		<group>
			<layout>hbox</layout>

			<hrule>
				<stretch type="bool">true</stretch>
			</hrule>
			<text>
				<label>Rudder</label>
			</text>
			<hrule>
				<stretch type="bool">true</stretch>
			</hrule>
		</group>
		
		<group>
			<layout>hbox</layout>
			
			<group>
				<layout>vbox</layout>
				
				<slider>
					<pref-width>150</pref-width>
					<property>/fdm/jsbsim/fcs/rudder-pos-deg</property>
					<min>-25</min>
					<max>25</max>
					<step>0.0025</step>
					<live>true</live>
				</slider>
			</group>
		</group>
	</group>
	
</PropertyList>
