<?xml version="1.0" encoding="utf-8"?>
<Context ColorSet="Beige_Black" Font="TwCenMT20" FontStyle="Shadow">
	<!-- Scrap Instances -->
	<Container ID="Scrap" Hidden="1">
		<!-- Special magical Build City button -->
		<Button ID="BuildCityButton" Size="64,64" Texture="BuildCity64.dds">
			<AlphaAnim Size="64,64" Texture="BuildCityGlow64.dds" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="1" AlphaEnd="0"/>
			<ShowOnMouseOver>
				<Image Size="64,64" Texture="BuildCityGold64.dds"/>
			</ShowOnMouseOver>
		</Button>
		<Grid ID="DarkBorders" Size="140,1"
			Texture="Grid9BlackIndentFade8Right.dds"
			CSize="1,1"	CTexStart="2,20"
			RSize="34,1" 	RTexStart="2,20"
			LCSize="1,8"	LCTexStart="7,35"
			LRSize="29,8"	LRTexStart="7,35"
			Color="255,255,255,96"/>
	</Container>

	<Container ID="Base" Size="Full,Full">

		<!-- Unit Ribbon Options -->
		<Grid ID="UnitTypesPanel" Anchor="L,B" Size="500,405" Offset="160,120" Style="Grid9DetailSix140" Padding="30,46" ConsumeMouse="1" Hidden="1" >
			<ScrollPanel ID="UnitTypesScrollPanel" Anchor="L,C" Offset="20,0" Vertical="1" AutoScrollBar="1" Size="450,320" >
				<Stack ID="UnitTypesStack" StackGrowth="Right" WrapWidth="350" WrapGrowth="Down"/>
				<ScrollBar Style="VertSlider" Anchor="R,C" Length="284" AnchorSide="o,i"/>
				<UpButton Style="ScrollBarUp" Anchor="R,T" AnchorSide="o,i"/>
				<DownButton Style="ScrollBarDown" Anchor="R,B" AnchorSide="o,i"/>
			</ScrollPanel>
		</Grid>

		<!-- Unit Panel -->
		<Container ID="Panel" Size="Full,Full">
			<Image ID="BackgroundCivFrame" Anchor="L,B" Offset="234,18" Size="64,64" Color="White.0" Texture="IconFrame64.dds" Hidden="1">
				<Image ID="BackgroundCivSymbol" Anchor="C,C" Size="128,128" Color="White.128" Texture="CivSymbolsColor.dds"/>
			</Image>

			<Image Anchor="L,B" Offset="500,0" Texture="BottomLeft128x224.dds" Size="128,224"/>

			<!-- Worker Action Panel -->
			<Grid ID="WorkerActionPanel" Anchor="L,B" Offset="517,-39" Size="290,210" Style="Grid9DetailFive140" ConsumeMouse="1">
				<TextButton ID="EditButton" Offset="30,25" Anchor="R,T" AnchorSide="I.I" Font="TwCenMT14" ColorSet="Beige_Black_Alpha" String="TXT_KEY_EDIT_BUTTON" ToolTip="TXT_KEY_EDIT_BUTTON" FontStyle="Shadow" MouseOverStyle="SoftShadow"/>
				<Label ID="WorkerText" Anchor="C,T" Offset="0,18" Font="TwCenMT20" FontStyle="Shadow" String="TXT_KEY_WORKERACTION_TEXT"/>
				<Label ID="PromotionText" Offset="60,18" Font="TwCenMT20" String="TXT_KEY_UPANEL_UNIT_PROMOTED" FontStyle="Shadow"/>

				<FlipAnim ID="PromotionAnimation" Size="64,64" Offset="12,-12" Columns="4" Speed="10" Pause=".5" StepSize="64,64" FrameCount="8" Texture="PromotionAnimation.dds"/>

				<Stack ID="WorkerActionStack" Offset="25,50" StackGrowth="Right" Padding="8" WrapWidth="250" WrapGrowth="Down" WrapPadding="8">
					<Container ID="RecommendedAction" Size="232.60" >
						<Container ID="RecommendedActionIcon" Size="64.64">
							<Label ID="RecommendedActionLabel" Anchor="R,T" AnchorSide="O.I" Font="TwCenMT16" WrapWidth="188" FontStyle="Shadow" String="TXT_KEY_UPANEL_REPAIR_TILE"/>
						</Container>
						<Image ID="RecommendedActionDivider" Anchor="C,B" Size="232.1" TextureOffset="34.0" Texture="bar300x2.dds" />
					</Container>
				</Stack>
			</Grid>

			<!-- Background -->
			<Grid Anchor="L,B" Offset="-37,-39" Size="546,208" Style="Grid9DetailFive140" ConsumeMouse="1">

				<!-- Next/Prev Unit -->
				<Container Anchor="R,T" Offset="17,17" Size="280,22">
					<Button ID="UnitNameButton" Anchor="C,C" Size="280,22">
						<Label ID="UnitName" String="TXT_KEY_UPANEL_UNIT_NAME" Anchor="C,C" Offset="0,-4" Font="TwCenMT24" ColorSet="Beige_Black_Alpha" FontStyle="SoftShadow" ToolTip="TXT_KEY_CURRENTLY_SELECTED_UNIT"/>
					</Button>
					<Button ID="CycleLeft" Anchor="R,C" Size="32,32" Texture="UnitPanelArrows.dds" ToolTip="TXT_KEY_UPANEL_CYCLELEFT"/>
					<Button ID="CycleRight" Anchor="L,C" Size="32,32" TextureOffset="30,0" Texture="UnitPanelArrows.dds" ToolTip="TXT_KEY_UPANEL_CYCLERIGHT"/>"
				</Container>

				<!-- Promotions -->
				<Stack ID="EarnedPromotionStack" Anchor="R,T" Offset="17,44" StackGrowth="Left"/>

				<!-- XP METER -->
				<Grid ID="XPFrame" Anchor="R,T" Offset="17,70" Size="275,12" Style="Grid9FrameTurns">
					<TextureBar ID="XPMeter" Offset="3,2" Texture="XPmeter.dds" Size="269,7"/>
				</Grid>

				<!-- Unit Stats -->
				<Grid ID="UnitStatBox" Anchor="R,T" Offset="17,82" Size="260,27" Style="Grid9FrameTurns">
					<Stack ID="UnitStats" Anchor="C,C" Padding="-5" StackGrowth="Right" >
						<Image ID="MovementPip" Anchor="C,C" Texture="MarcPips.dds" Size="32.32"/>
						<Image ID="Mission" Anchor="C,C" Size="45.45">
							<Label ID="MissionText" Anchor="C,C" Font="TwCenMT24" FontStyle="Stroke" Color0="0,255,0,255" Color1="Black,155"/>
						</Image>
						<Label ID="UnitStatMovement" Anchor="C,C" ToolTip="TXT_KEY_UPANEL_MOVEMENT_TT"/>
						<Container Size="15,1"/>
						<Label ID="UnitStatStrength" Anchor="C,C" ToolTip="TXT_KEY_UPANEL_STRENGTH_TT"/>
						<Container Size="15,1"/>
						<Label ID="UnitStatRangedAttack" Anchor="C,C" ToolTip="TXT_KEY_UPANEL_RANGED_ATTACK_TT"/>
					</Stack>
				</Grid>

				<!-- Health Bar	-->
				<Image ID="HealthBar" Anchor="R,B" Offset="0,39" Texture="HealthBarBlack.dds" Size="17,127" ToolTip="TXT_KEY_UPANEL_HEALTH" Hidden="1">
					<Image ID="GreenBar" Anchor="C,B" Offset="-1,2" Texture="HealthBarGreen.dds" Size="9,122" Hidden="1"/>
					<Image ID="YellowBar" Anchor="C,B" Offset="-1,2" Texture="HealthBarYellow.dds" Size="9,122" Hidden="1"/>
					<Image ID="RedBar" Anchor="C,B" Offset="-1,2" Color="255.255.255.100" Texture="HealthBarRed.dds" Size="14,30" Hidden="1">
						<AlphaAnim ID="RedAnim" Anchor="R,B" Texture="HealthBarRed.dds" Size="9,122" Pause="0" Cycle="Bounce" Speed="2" AlphaStart=".5" AlphaEnd="1"/>
					</Image>
				</Image>
			</Grid>

			<!-- Unit Portrait -->
			<Image ID="Button" Anchor="L,B" Texture="UnitPanel.dds" Size="256,256"/>
			<Image ID="UnitPortrait" Anchor="L,B" Offset="-28,-23" Size="256,256" Texture="UnitPortraitsAncientMedieval.dds" />
			<Image ID="UnitTypeFrame" Anchor="L,B" Size="54,54" Texture="UnitTypeFrame.dds">
				<Image ID="UnitIconBackground" Size="38,38" Anchor="C,C" Color="PlayerColor2,255" Texture="unitbackteamcolor.dds"/>
				<Image Size="38,38" TextureOffset="0,39" Anchor="C,C" Texture="unitbackteamcolor.dds"/>
				<Image ID="UnitIconShadow" Size="32,32" Anchor="C,C" Texture="UnitFlagAtlasWhite.dds" Color="Black,128"/>
				<Image ID="UnitIcon" Size="32,32" Anchor="C,C" Color="PlayerColor1" Texture="UnitFlagAtlasWhite.dds" ToolTip="TXT_KEY_CURRENTLY_SELECTED_UNIT"/>
			</Image>
			<Button ID="UnitPortraitButton" Anchor="L,B" Size="200,200" />

			<!-- Unit Actions -->
			<Container ID="Actions" Anchor="L,B" Size="500,208">
				<Stack ID="ActionStack" Anchor="R,B" StackGrowth="Left" Padding="4" WrapWidth="500" WrapGrowth="Up" WrapPadding="8"/>
			</Container>
		</Container>

		<!-- City Ribbon -->
		<Container ID="CityPanel" Offset="0,70">
			<ScrollPanel ID="CityScrollPanel" Offset="18,0" Vertical="1" AutoScrollBar="1" Size="140,1" ConsumeMouseOver="1" ConsumeMouseButton="1" Hidden="1">
				<ScrollBar Style="VertSlider" Anchor="L,C" Length="18" AnchorSide="o,i"/>
				<UpButton Style="ScrollBarUp" AnchorSide="o,i"/>
				<DownButton Style="ScrollBarDown" Anchor="L,B" AnchorSide="o,i"/>
			</ScrollPanel>
			<!-- City Stack -->
			<Stack ID="CityStack" StackGrowth="Bottom" Padding="-8"/>
		</Container>

		<!-- Unit Ribbon -->
		<Container ID="UnitPanel" Anchor="L,B" Offset="0,215">
			<GridButton ID="UnitTypesButton" Size="48,32" Style="SmallButton2" Anchor="L,B" Offset="0,4" AnchorSide="i,o" ToolTip="TXT_KEY_EUI_UNIT_TYPES_TT">
				<Image ID="UnitTypesOpen" Anchor="C,C" Offset="0,1" Texture="OpenSecondary.dds" Size="64,32"/>
				<Image ID="UnitTypesClose" Anchor="C,C" Offset="-1,1" Texture="CloseSecondary.dds" Size="64,32" Hidden="1"/>
			</GridButton>
			<ScrollPanel ID="UnitScrollPanel" Anchor="L,B" Offset="18,0" Vertical="1" AutoScrollBar="1" Size="100,60" ConsumeMouseOver="1" ConsumeMouseButton="1" Hidden="1">
				<ScrollBar Style="VertSlider" Anchor="L,C" Length="18" AnchorSide="o,i"/>
				<UpButton Style="ScrollBarUp" AnchorSide="o,i"/>
				<DownButton Style="ScrollBarDown" Anchor="L,B" AnchorSide="o,i"/>
			</ScrollPanel>
			<!-- Unit Stack -->
			<Stack ID="UnitStack" Anchor="L,B" StackGrowth="Top" Padding="-8"/>
		</Container>
	</Container>

	<!-- City Instance -->
	<Instance Name="CityInstance">
		<Button ID="Button" Size="64,64" Offset="-7,0" Texture="64x64CityWorker.dds" ConsumeMouse="1">
			<Image ID="CityProduction" Size="64,64">
				<TextureBar ID="BuildMeter" Size="64,64" Texture="64x64FrameButtons.dds" HasShadow="1" ShadowColor="White,99" Direction="Down"/>
			</Image>
			<TextureBar ID="GrowthMeter" Size="64,64" Texture="BuildCity64.dds" Color="Green,255" Direction="Up" Hidden="1"/>
			<Label ID="CityResistanceTurns" Anchor="C,C" Font="TwCenMT22" FontStyle="Stroke" Color0="Red,255" Color1="Black,155" />
			<Label ID="CityIsCapital" Offset="6,6" String="[ICON_CAPITAL]"/>
			<Label ID="CityIsPuppet" Offset="6,6" String="[ICON_PUPPET]"/>
			<Label ID="CityIsOccupied" Offset="6,6" String="[ICON_OCCUPIED]" ToolTip="TXT_KEY_CITY_OCCUPIED"/>
			<Label ID="CityIsResistance" Offset="6,6" String="[ICON_RESISTANCE]"/>
			<Label ID="CityIsRazing" Offset="6,6" String="[ICON_RAZING]"/>
			<Label ID="CityIsConnected" Offset="6,40" String="[ICON_CONNECTED]"/>
			<Label ID="CityIsBlockaded" Offset="6,40" String="[ICON_BLOCKADED]" ToolTip="TXT_KEY_CITY_BLOCKADED"/>
			<Label ID="CityReligion" Offset="40,6"/>
			<Label ID="CityFocus" Offset="40,40"/>
			<Label ID="CityName" Offset="64,8" Font="TwCenMT14" FontStyle="Stroke" Color0="Beige,255" Color1="Black,155" TruncateWidth="120"/>
			<Stack Offset="64,22" Padding="6" StackGrowth="Right">
				<Label ID="CityPopulation" Font="TwCenMT22" FontStyle="Stroke" Color0="White,255" Color1="Black,155"/>
				<Label ID="CityQuests"/>
			</Stack>
			<Stack Offset="66,42" Padding="8" StackGrowth="Right">
				<Label ID="BuildGrowth" Font="TwCenMT18" FontStyle="Stroke" Color0="Production,255" Color1="Black,155"/>
				<Label ID="CityGrowth" Font="TwCenMT18" FontStyle="Stroke" Color0="Food,255" Color1="Black,155"/>
				<Label ID="BorderGrowth" Font="TwCenMT18" FontStyle="Stroke" Color0="Culture,255" Color1="Black,155"/>
			</Stack>
		</Button>
	</Instance>

	<!-- Unit Instance -->
	<Instance Name="UnitInstance">
		<Button ID="Button" Size="64,64" Offset="-7,0" Texture="64x64FrameButtons.dds" ConsumeMouse="1">
			<TextureBar ID="HealthMeter" Size="64,64" Texture="64x64FrameButtons.dds" Direction="Up" Hidden="1"/>

			<!-- Unit Icon -->
			<Image ID="Portrait" Size="64,64"/>

			<!-- Unit Flags -->
			<AlphaAnim ID="MovementPip" Anchor="C,C" Offset="30,-15" Texture="MarcPips.dds" Size="32.32" Pause="0" Cycle="Bounce" Speed="5" AlphaStart="1" AlphaEnd="0.25" Stopped="1" />
			<Image ID="Mission" Anchor="C,C" Offset="30,10" Size="45.45">
				<Label ID="MissionText" Anchor="C,C" Font="TwCenMT18" FontStyle="Stroke" Color0="0,255,0,255" Color1="Black,155"/>
			</Image>
			<!-- Promotions -->
			<Stack ID="PromotionStack" Anchor="R,T" AnchorSide="O,I" Offset="5,0" Padding="-14" WrapPadding="-14" StackGrowth="Bottom" WrapGrowth="Right" WrapWidth="60" />
		</Button>
	</Instance>

	<!-- Unit Type Instance -->
	<Instance Name="UnitTypeInstance">
		<Button ID="Button" Size="64,64"> <!--Texture="64x64FrameButtons.dds"-->
			<Image ID="Portrait" Anchor="C,C" Size="64,64"/>
			<Label ID="Count" Anchor="R,B" Offset="10,10" Font="TwCenMT22" FontStyle="Stroke" Color0="0,255,0,255" Color1="Black,155"/>
			<CheckBox ID="CheckBox" ButtonSize="64.64" CheckSize="64.64" ButtonTexture="Blank.dds" Anchor="C,C" Size="64.64"/>
		</Button>
	</Instance>

	<!-- Unit Action Button -->
	<Instance Name="UnitAction">
		<GridButton ID="UnitActionButton" Size="50,50" Style="BaseButton">
			<TextureBar ID="WorkerProgressBar" Anchor="C,C" Size="46,45" Texture="WorkerMeter.dds" Direction="Up"/>
			<Image ID="UnitActionIcon" Anchor="C,C" Size="64,64" Texture="UnitActions.dds"/>
			<Label ID="UnitActionText" Anchor="C,C" Font="TwCenMT24" FontStyle="Stroke" Color0="0,255,0,255" Color1="Black,155" />
		</GridButton>
	</Instance>

	<!-- Promotion Instance -->
	<Instance Name="EarnedPromotionInstance">
		<Container ID="EarnedPromotion" Size="26,26" >
			<Image ID="UnitPromotionImage" Anchor="C,C" Size="32,32" Texture="Promotions256.dds"/>
		</Container>
	</Instance>

</Context>