<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE Resource SYSTEM "AATeam/cockpit-0.3.0.dtd">

<Resource type="aacockpit" name="xevi" version="0.0.8" author="xevi" category="">
    <Cockpit version="0.0.1">
        <!-- speed meter -->
        <NeedleGauge camera="*">
            <DataSet>
                <AtomicData field="source" source="player_speed" />
                <AtomicData field="minimum" source="0" />
                <AtomicData field="maximum" source="max_speed" />
            </DataSet>
            <Position x=".2" y="-.85" />
            <Size height="0.15" width="0.15" />
            <ShowCurrent value="true" />
            <ShowMaximum value="false" />
            <ShowMinimum value="false" />
            <Caption location="bottom">
                <Text value="Speed" />
            </Caption>
            <Foreground>
                <Solid>
                    <Color r="1." g="0." b="0." alpha="1." />
                </Solid>
            </Foreground>
        </NeedleGauge>

        <!-- max speed-->
        <Label camera="*">
            <DataSet id="cms">
                <AtomicData source="fastest_speed" />
            </DataSet>
            <DataSet id="colorcms">
               <Conditional lvalue="player_speed" rvalue="fastest_speed" operator="lt">
                 <IfTrue>  <AtomicData source="0xff0000" /></IfTrue>
                 <IfFalse> <AtomicData source="0xffffff" /></IfFalse>
              </Conditional>
            </DataSet>
            <Position x="0.098" y="-0.93" />
            <Size height="0.035" width="0.045" />
            <Face>
                <Table>
                     <Row>
                        <Cell><Text value="Current Max:" /></Cell>
                        <Cell><GameData data="colorcms" /><GameData data="cms"/></Cell>
                    </Row>
                </Table>
            </Face>
        </Label>

        <!-- rubber meter -->
        <BarGauge camera="*">
            <DataSet>
                <AtomicData field="source" source="player_rubber" />
                <AtomicData field="minimum" source="0" />
                <AtomicData field="maximum" source="cycle_rubber" />
            </DataSet>
            <Position x="-0.6" y="-0.85" />
            <Size height="0.06" width="0.19" />
            <ShowCurrent value="true" />
            <ShowMaximum value="true" />
            <ShowMinimum value="true" />
            <Caption location="bottom">
                <Text value="Rubber" />
            </Caption>
            <Background>
                <Gradient orientation="value">
                    <Color r="0." g="1." b="0." alpha=".0" at="0." />
                    <Color r="0." g="1." b="0." alpha=".1" at=".3" />
                    <Color r="1." g="1." b="1." alpha=".2" at=".4" />
                    <Color r="1." g="1." b="1." alpha=".2" at="1." />
                </Gradient>
            </Background>
            <Foreground>
                <Gradient orientation="value">
                    <Color r="0." g="1." b="0." alpha=".7" at="0." />
                    <Color r="0." g="1." b="0." alpha=".7" at=".3" />
                    <Color r="1." g="1." b="0." alpha=".7" at=".6" />
                    <Color r="1." g="0." b="0." alpha=".7" at=".8" />
                    <Color r="1." g="0." b="0." alpha=".7" at="1." />
                </Gradient>
            </Foreground>
        </BarGauge>
        
        <!-- brakes -->
        <BarGauge camera="*">
            <DataSet>
                <AtomicData field="source" source="player_brakes" />
                <AtomicData field="minimum" source="0" />
                <AtomicData field="maximum" source="1" />
            </DataSet>
            <Position x="-.2" y="-0.85" />
            <Size height="0.05" width="0.12" />
            <ShowCurrent value="true" />
            <ShowMaximum value="true" />
            <ShowMinimum value="true" />
            <Caption location="bottom">
                <Text value="Brakes" />
            </Caption>
            <Background>
                <Solid>
                    <Color r="1." g="1." b="1." alpha=".2" />
                </Solid>
            </Background>
            <Foreground>
                <Gradient orientation="value">
                    <Color r="1." g="0." b="0." alpha=".7" at="0." />
                    <Color r="1." g="1." b="0." alpha=".7" at=".5" />
                    <Color r="0." g="1." b="0." alpha=".7" at="1." />
                </Gradient>
            </Foreground>
        </BarGauge>

        <!-- Tunned Enemies: x Mates: y display -->
        <Label camera="*">
            <DataSet id="enemies">
                <AtomicData field="source" source="enemies_alive" />
            </DataSet>
            <DataSet id="friends">
                <AtomicData field="source" source="friends_alive" />
            </DataSet>
            <DataSet id="enemiescolor">
                        <AtomicData field="source" source="0xff0000" />
            </DataSet>
            <DataSet id="friendscolor">
                      <AtomicData field="source" source="0x00ff00" />
            </DataSet>

            <DataSet id="labelfriendscolor">
               <Conditional lvalue="friends_alive" rvalue="enemies_alive" operator="eq">
                 <IfTrue>
                        <AtomicData source="0xffffff" />
                 </IfTrue>
                 <IfFalse>
                    <Conditional lvalue="1" rvalue="friends_alive" operator="eq">
                   <IfTrue>
                         <AtomicData source="0xff0000" />
                    </IfTrue>
                    <IfFalse>
                        <Conditional lvalue="enemies_alive" rvalue="friends_alive" operator="ge">
                            <IfTrue>
                                <AtomicData source="0xffffff" />
                            </IfTrue>
                            <IfFalse>
                                <AtomicData source="0xffff00" />
                            </IfFalse>
                        </Conditional>
                      </IfFalse>
                    </Conditional>
                </IfFalse>
              </Conditional>
            </DataSet>
            <DataSet id="labelenemiescolor">
               <Conditional lvalue="friends_alive" rvalue="enemies_alive" operator="eq">
                 <IfTrue>
                        <AtomicData source="0xffffff" />
                 </IfTrue>
                 <IfFalse>
                    <Conditional lvalue="1" rvalue="enemies_alive" operator="eq">
                   <IfTrue>
                         <AtomicData source="0xff0000" />
                    </IfTrue>
                    <IfFalse>
                        <Conditional lvalue="friends_alive" rvalue="enemies_alive" operator="ge">
                            <IfTrue>
                                <AtomicData source="0xffffff" />
                            </IfTrue>
                            <IfFalse>
                                <AtomicData source="0xffff00" />
                            </IfFalse>
                       </Conditional>
                      </IfFalse>
                    </Conditional>
                </IfFalse>
              </Conditional>
            </DataSet>
            
            <Position x="-0.32" y="-0.93" />
            <Size height="0.035" width="0.027" /> <!-- Size would be the font size in this case -->
            <Caption location="off">
                <Text value="Player Status" />
            </Caption>
            <Face>
                <Table>
                    <Row>
                        <Cell><GameData data="labelenemiescolor" /><Text value="Enemies:" /></Cell>
                        <Cell><GameData data="enemiescolor" /><GameData data="enemies" /></Cell>
                        <Cell><GameData data="labelfriendscolor" /><Text value="Friends:" /></Cell>
                        <Cell><GameData data="friendscolor" /><GameData data="friends" /></Cell>
                    </Row>
                </Table>
            </Face>
        </Label>
        
        <!-- ping -->
        <Label camera="*" toggle="3" toggleSticky="true" toggleDefault="on">
            <DataSet id="ping">
                <AtomicData field="source" source="current_ping" />
            </DataSet>
            <Position x="-0.75" y="-0.93" />
            <Size height="0.035" width="0.017" /> <!-- Size would be the font size in this case -->
            <Caption location="off">
                <Text value="Player Status" />
            </Caption>
            <Face>
                <Table>
                    <Row>
                        <Cell><Text value="Ping:" /></Cell>
                        <Cell><GameData data="ping" /></Cell>
                    </Row>
                </Table>
            </Face>
        </Label>
        
        <!-- fps-->
        <Label camera="*" toggle="3" toggleSticky="true" toggleDefault="on">
            <DataSet id="fps">
                <AtomicData source="current_framerate" />
            </DataSet>
            <Position x="-0.52" y="-0.93" />
            <Size height="0.035" width="0.017" />
            <Face>
                <Table>
                     <Row>
                        <Cell><Text value="FPS:" /></Cell>
                        <Cell><GameData data="fps"/></Cell>
                    </Row>
                </Table>
            </Face>
        </Label>
        
        <!-- map -->
        <Map camera="*" toggle="3" toggleSticky="true" toggleDefault="on">
            <Position x="0.65" y="-0.65" />
            <Size height="0.30" width="0.30" />
		<Background>
			<Solid>
				<Color r="0" g="0" b="0" alpha="0.1" />
			</Solid>
		</Background>
        </Map>
        <Map camera="*" toggle="3" toggleSticky="true" toggleDefault="off">
            <Position x="0" y="-.23" />
            <Size height=".7" width="0.7" />
		<Background>
			<Solid>
				<Color r="0" g="0" b="0" alpha="0.1" />
			</Solid>
		</Background>
        </Map>

   <!--Gauges for warning bars: time_to_impact_front, time_to_impact_right and time_to_impact_left -->


        <WidgetTemplate id="ImpactsH" toggle="1" toggleSticky="true" toggleDefault="on">
            <ShowCurrent value="false" />
            <ShowMaximum value="false" />
            <ShowMinimum value="false" />
            <Background>
                <Solid>
                    <Color r="0." g="1." b="0." alpha=".02"  />
                </Solid>
            </Background>
          <Size height="0.24" width="1.5" />
        </WidgetTemplate>
        
        <WidgetTemplate id="ImpactsV" toggle="1" toggleSticky="true" toggleDefault="on">
                    <ShowCurrent value="false" />
            <ShowMaximum value="false" />
            <ShowMinimum value="false" />
            <Background>
                <Solid>
                    <Color r="0." g="1." b="0." alpha=".02"  />
                </Solid>
            </Background>
           <Foreground>
                <Gradient orientation="value">
                    <Color r="0." g="1." b="0." alpha=".05" at="0." />
                    <Color r="1." g="8." b="0." alpha=".3" at=".8" />
                    <Color r="1." g="0." b="0." alpha=".35" at="1" />
                </Gradient>
          </Foreground>
          <Size height="1.5" width=".1" />
        </WidgetTemplate>
        
          <!-- front impact -->
         <BarGauge camera="*" usetemplate="ImpactsH">
            <DataSet>
               <Conditional lvalue="time_to_impact_front" rvalue=".33" operator="lt">
                <IfTrue> <AtomicData field="source" source="1" /></IfTrue>
                 <IfFalse>
                        <Conditional lvalue="time_to_impact_front" rvalue=".88" operator="lt">
                        <IfTrue><AtomicData field="source" source=".89" /> </IfTrue>
                        <IfFalse><AtomicData field="source" source=".2" /> </IfFalse>
                        </Conditional>
                 </IfFalse>
               </Conditional>
	         	<AtomicData field="minimum" source=".2" />
	          	<AtomicData field="maximum" source="1." />
	        </DataSet>
           <Foreground>
                <Gradient orientation="value">
                    <Color r="0." g="1." b="0." alpha=".05" at="0." />
<!--                    <Color r="1." g="8." b="0." alpha=".45" at=".8" />
                    <Color r="1." g="0." b="0." alpha=".69" at="1" /> -->
                    <Color r="1." g="8." b="0." alpha=".3" at=".8" />
                    <Color r="1." g="0." b="0." alpha=".35" at="1" />

                </Gradient>
          </Foreground>
           <!-- <Position x="0" y=".33" /> -->
           <Position x="0" y="-1" />
        </BarGauge>

          <!-- left impact -->
        <VerticalBarGauge camera="*" usetemplate="ImpactsV">
            <DataSet>
               <Conditional lvalue="time_to_impact_left" rvalue=".17" operator="lt">
                 <IfTrue> <AtomicData field="source" source="1" /></IfTrue>
                 <IfFalse>
                        <Conditional lvalue="time_to_impact_left" rvalue=".45" operator="lt">
                        <IfTrue><AtomicData field="source" source=".89" /> </IfTrue>
                        <IfFalse><AtomicData field="source" source=".2" /> </IfFalse>
                        </Conditional>
                 </IfFalse>
               </Conditional>
	         	<AtomicData field="minimum" source=".2" />
	          	<AtomicData field="maximum" source="1." />
	        </DataSet>
           <Position x="-.94" y="-.1" />
        </VerticalBarGauge >
        
          <!-- right impact -->
         <VerticalBarGauge camera="*" usetemplate="ImpactsV">
            <DataSet>
               <Conditional lvalue="time_to_impact_right" rvalue=".17" operator="lt">
                <IfTrue> <AtomicData field="source" source="1" /></IfTrue>
                 <IfFalse>
                        <Conditional lvalue="time_to_impact_right" rvalue=".45" operator="lt">
                        <IfTrue><AtomicData field="source" source=".89" /> </IfTrue>
                        <IfFalse><AtomicData field="source" source=".2" /> </IfFalse>
                        </Conditional>
                 </IfFalse>
               </Conditional>
	         	<AtomicData field="minimum" source=".2" />
	          	<AtomicData field="maximum" source="1." />
	        </DataSet>
           <Position x=".94" y="-.1" />
        </VerticalBarGauge >
        

        <!-- rubber warning
         <BarGauge camera="*" usetemplate="ImpactsH" toggle="2" toggleSticky="true" toggleDefault="off">
            <DataSet id="rubberw">
                <Math lvalue="player_rubber" rvalue="cycle_rubber" type="quotient" />
            </DataSet>
            <DataSet>
              <Conditional lvalue="rubberw" rvalue=".75" operator="gt">
                 <IfTrue> <AtomicData field="source" source=".98" /></IfTrue>
                 <IfFalse><AtomicData field="source" source="0" /> </IfFalse>
               </Conditional>
	         	<AtomicData field="minimum" source="0" />
	          	<AtomicData field="maximum" source="1" />
	        </DataSet>
            <Foreground>
                <Gradient orientation="value">
                    <Color r="0." g="1." b="0" alpha=".05" at="0." />
                    <Color r="1." g="0" b="0" alpha=".17" at=".8" />
                </Gradient>
          </Foreground>
            <Position x="-0.59" y="-0.97" />
            <Size height="0.75" width="0.16" />
        </BarGauge>   -->

        
    </Cockpit>
</Resource>
