<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE Resource SYSTEM "cockpit.dtd">

<Resource type="aacockpit" name="slitherw" version="0.1" author="Durf" category="cockpits/slither">
	 <Cockpit version="0.2">

		<!-- Ping / FPS / location / players / time -->
		<Label camera="*" viewport="all" toggle="1">
			<DataSet id="leftcolor">
				<AtomicData source="0x888888" />
			</DataSet>
			<DataSet id="hwite">
				<AtomicData source="0xffffff" />
			</DataSet>
			<DataSet id="yel">
				<AtomicData source="0xffdd88" />
			</DataSet>
			<DataSet id="blu">
				<AtomicData source="0x88ddff" />
			</DataSet>
			<DataSet id="gre">
				<AtomicData source="0x80ffa0" />
			</DataSet>
			<DataSet id="pur">
				<AtomicData source="0x9850ff" />
			</DataSet>
			<DataSet id="ping">
				<AtomicData field="source" source="current_ping" />
			</DataSet>
			<DataSet id="locx">
				<AtomicData field="source" source="current_pos_x" />
			</DataSet>
			<DataSet id="locy">
				<AtomicData field="source" source="current_pos_y" />
			</DataSet>
			<DataSet id="fps">
				<AtomicData source="current_framerate" />
			</DataSet>
			<DataSet id="snakes">
				<AtomicData source="enemies_alive" />
			</DataSet>
			<DataSet id="hours">
				<AtomicData source="current_hours12h" minwidth="2" fill="0" />
			</DataSet>
			<DataSet id="minutes">
				<AtomicData source="current_minutes" minwidth="2" fill="0" />
			</DataSet>
			<DataSet id="ampm">
				<Conditional field="source" lvalue="current_hours" rvalue="12" operator="le">
					<IfTrue>
						<AtomicData source="AM" />
					</IfTrue>
					<IfFalse>
						<AtomicData source="PM" />
					</IfFalse>
				</Conditional>
			</DataSet>
			
			<Position x="-0.95" y="-0.8" />
			<Size height="0.04" width="0.02" />
			<Face>
				<Table>
					<Row>
						<Cell><GameData data="yel" /><GameData data="ping" /><Text value=" ms" /></Cell>
						<Cell><GameData data="blu" /><GameData data="fps" /><Text value=" fps" /></Cell>
					</Row>
					<Row>
						<Cell><GameData data="leftcolor" /><Text value="X: " /><GameData data="hwite" /><GameData data="locx" /></Cell>
						<Cell><GameData data="leftcolor" /><Text value="Y: " /><GameData data="hwite" /><GameData data="locy" /></Cell>
					</Row>
					<Row>
						<Cell><GameData data="gre" /><Text value="Players: " /></Cell>
						<Cell><GameData data="hwite" /><GameData data="snakes" /></Cell>
					</Row>
					<Row>
						<Cell><GameData data="pur" /><GameData data="hours" /><Text value=":" /><GameData data="minutes" /><Text value=" " /><GameData data="ampm" /></Cell>
					</Row>
				</Table>
			</Face>
		</Label>

		<!-- Leaderboard -->
		<Label camera="*" viewport="all" toggle="1">
			<DataSet id="lbhcolor">
				<AtomicData source="0xffffff" />
			</DataSet>
			<DataSet id="acolor">
				<AtomicData source="0xa07676" />
			</DataSet>
			<DataSet id="rightcolor">
				<AtomicData source="0x76a0a0" />
			</DataSet>
			<DataSet id="score">
				<AtomicData field="source" source="current_score" />
			</DataSet>
			<DataSet id="topscore">
				<AtomicData field="source" source="top_score" />
			</DataSet>
			<DataSet id="cname">
				<AtomicData field="source" source="current_colored_name" />
			</DataSet>
			<DataSet id="scorecolor">
				<Conditional field="source" lvalue="current_score" rvalue="top_score" operator="eq">
					<IfTrue>
						<AtomicData source="0x00ff00" />
					</IfTrue>
					<IfFalse>
						<Conditional lvalue="current_score" rvalue="top_other_score" operator="gt">
							<IfTrue>
								<AtomicData source="0x00ff00" />
							</IfTrue>
							<IfFalse>
								<AtomicData source="0x76a0a0" />
							</IfFalse>
						</Conditional>
					</IfFalse>
				</Conditional>
			</DataSet>
			<DataSet id="bcolor">
				<Conditional field="source" lvalue="current_score" rvalue="top_score" operator="eq">
					<IfTrue>
						<AtomicData source="0x88ff88" />
					</IfTrue>
					<IfFalse>
						<Conditional lvalue="current_score" rvalue="top_score" operator="gt">
							<IfTrue>
								<AtomicData source="0x00ff00" />
							</IfTrue>
							<IfFalse>
								<AtomicData source="0xa07676" />
							</IfFalse>
						</Conditional>
					</IfFalse>
				</Conditional>
			</DataSet>
			
			<Position x="0.78" y="0.45" />
			<Size height="0.04" width="0.02" />
			<Face>
				<Table>
					<Row>
						<Cell><GameData data="lbhcolor" /><Text value="Leaderboard" /></Cell>
					</Row>
					<Row>
						<Cell><GameData data="acolor" /><Text value="1st:" /></Cell>
						<Cell><GameData data="bcolor" /><GameData data="topscore" /></Cell>
					</Row>
					<Row>
						<Cell><GameData data="scorecolor" /><GameData data="cname" /></Cell>
						<Cell><GameData data="scorecolor" /><GameData data="score" /></Cell>
					</Row>
				</Table>
			</Face>
		</Label>

		<!--
			Mini Map
		-->
		<Map camera="*" toggle="2">
			<Position x="0.85" y="-0.85" />
			<Size height="0.065" width="0.065" />
			<Background>
				<!-- Position x="-0.2" y="-0.2" / -->
				<Image scale_x="1" scale_y="1" repeat="both">
					<Graphic author="Durf" category="cockpits/slither" version="2" name="radar" extension="png" />
				</Image>
				<Solid>
					<Color r="0.6" g="0.6" b="0.6" alpha=".5" />
				</Solid>
			</Background>
			<MapModes toggleKey="3">
				<MapMode mode="full" rotation="fixed" />
				<MapMode mode="closestZone" rotation="camera" />
				<MapMode mode="cycle" rotation="camera" zoomFactor="3" clipMode="ellipse" />
				<MapMode mode="cycle" rotation="cycle" zoomFactor="3" />
				<MapMode mode="cycle" rotation="spawn" zoomFactor="4" />
				<MapMode mode="full" rotation="fixed" />
			</MapModes>
		</Map>

	 </Cockpit>
</Resource>
