<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

	<Script file="Templates/Templates.lua"/>

	<GameTooltip name="CPTooltipTemplate" inherits="SharedTooltipTemplate, DefaultScaleFrame" ignoreParentScale="true" virtual="true">
		<KeyValues>
			<KeyValue key="maxScale" value="CHAR_CUSTOMIZE_MAX_SCALE" type="global"/>
		</KeyValues>
	</GameTooltip>

	<GameTooltip name="CPNoHeaderTooltip" inherits="CPTooltipTemplate">
		<KeyValues>
			<KeyValue key="textLeft1Font" value="GameFontNormalMed3" type="string"/>
			<KeyValue key="textRight1Font" value="GameFontNormalMed3" type="string"/>
			<KeyValue key="textLeft2Font" value="GameFontNormalMed3" type="string"/>
			<KeyValue key="textRight2Font" value="GameFontNormalMed3" type="string"/>
		</KeyValues>
	</GameTooltip>

	<!-- charactercreate-ring-select -->
	<Texture name="CPRingSelectTexture" virtual="true" file="interface\AddOns\ConsolePort\Assets\Textures\Frame\General_Atlas">
		<Size x="236" y="236"/>
		<TexCoords left="0.27392578125" right="0.38916015625" top="0.5185546875" bottom="0.7490234375"/>
	</Texture>

	<!-- charactercreate-ring-metaldark -->
	<Texture name="CPRingMetalDarkTexture" virtual="true" file="interface\AddOns\ConsolePort\Assets\Textures\Frame\General_Atlas">
		<Size x="236" y="236"/>
		<TexCoords left="0.13720703125" right="0.27294921875" top="0.2763671875" bottom="0.5498046875"/>
	</Texture>


	<!-- CharCustomizeFrameWithTooltipMixin -->
	<Frame name="CPFrameWithTooltipTemplate" mixin="CPFrameWithTooltipMixin" virtual="true">
		<KeyValues>
			<KeyValue key="tooltipAnchor" value="ANCHOR_TOPRIGHT" type="string"/>
			<KeyValue key="tooltipXOffset" value="10" type="number"/>
			<KeyValue key="tooltipYOffset" value="0" type="number"/>
			<KeyValue key="tooltipMinWidth" value="300" type="number"/>
			<KeyValue key="tooltipPadding" value="5" type="number"/>
		</KeyValues>
		<Scripts>
			<OnLoad method="OnLoad"/>
			<OnEnter method="OnEnter"/>
			<OnLeave method="OnLeave"/>
		</Scripts>
	</Frame>

	<!-- inherits CharCustomizeFrameWithTooltipTemplate, CharCustomizeMaskedButtonMixin -->
	<CheckButton name="CPMaskedButtonTemplate" inherits="CPFrameWithTooltipTemplate" mixin="CPMaskedButtonMixin" motionScriptsWhileDisabled="true" virtual="true">
		<KeyValues>
			<KeyValue key="disabledOverlayAlpha" value="0" type="number"/>
			<KeyValue key="circleMaskSizeOffset" value="2" type="number"/>
		</KeyValues>
		<NormalTexture parentKey="NormalTexture"/>
		<HighlightTexture parentKey="HighlightTexture" alphaMode="ADD" alpha="0.5"/>
		<PushedTexture parentKey="PushedTexture">
			<Anchors>
				<Anchor point="TOPLEFT" y="-1"/>
				<Anchor point="BOTTOMRIGHT" y="-1"/>
			</Anchors>
		</PushedTexture>
		<CheckedTexture parentKey="CheckedTexture" inherits="CPRingSelectTexture" texelSnappingBias="0.0" snapToPixelGrid="false">
			<Anchors>
				<Anchor point="CENTER" />
			</Anchors>
		</CheckedTexture>
		
		<Layers>
			<Layer level="OVERLAY" textureSubLevel="-1">
				<Texture parentKey="DisabledOverlay" hidden="true" setAllPoints="true">
					<Color r="0.0" g="0.0" b="0.0"/>
				</Texture>
				<Texture parentKey="Ring">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<MaskTexture parentKey="CircleMask" file="Interface\CharacterFrame\TempPortraitAlphaMask" hWrapMode="CLAMPTOBLACKADDITIVE" vWrapMode="CLAMPTOBLACKADDITIVE" />
			</Layer>
		</Layers>
		
		<Frames>
			<Frame parentKey="Flash" setAllPoints="true" hidden="true">
				<Layers>
					<Layer level="OVERLAY">
						<Texture parentKey="Portrait" setAllPoints="true" alphaMode="ADD" />
						<Texture parentKey="Ring" alphaMode="ADD">
							<Anchors>
								<Anchor point="CENTER"/>
							</Anchors>
						</Texture>
						<Texture parentKey="Ring2" alphaMode="ADD">
							<Anchors>
								<Anchor point="CENTER"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Animations>
					<AnimationGroup parentKey="Anim" setToFinalAlpha="true" looping="REPEAT">
						<Alpha order="1" childKey="Portrait" duration="0.8" fromAlpha="0" toAlpha="0.6" />
						<Alpha order="1" childKey="Portrait" duration="0.8" fromAlpha="0.6" toAlpha="0" startDelay="0.8" />
						<Alpha order="1" childKey="Ring" duration="0.8" fromAlpha="0" toAlpha="1" />
						<Alpha order="1" childKey="Ring" duration="0.8" fromAlpha="1" toAlpha="0" startDelay="0.8" />
						<Alpha order="1" childKey="Ring2" duration="0.8" fromAlpha="1" toAlpha="0" />
						<Scale order="1" childKey="Ring2" duration="0.8" fromScaleX="1.3" toScaleX="1" fromScaleY="1.3" toScaleY="1" smoothing="NONE" />
					</AnimationGroup>
				</Animations>
			</Frame>
		</Frames>
		
		<Scripts>
			<OnMouseDown method="OnMouseDown"/>
			<OnMouseUp method="OnMouseUp"/>
			<OnClick method="OnClick"/>
		</Scripts>
	</CheckButton>


	<!-- CharacterCreateClassButtonMixin -->
	<CheckButton name="CPButtonTemplate" inherits="CPMaskedButtonTemplate" mixin="CPButtonMixin" virtual="true">
		<Size x="67" y="67"/>
		<KeyValues>
			<KeyValue key="ringAtlas" value="ring-metaldark" type="string"/>
			<KeyValue key="ringWidth" value="116" type="number"/>
			<KeyValue key="ringHeight" value="117" type="number"/>
			<KeyValue key="checkedTextureSize" value="99" type="number"/>
			<KeyValue key="disabledOverlayAlpha" value="0.75" type="number"/>
			<KeyValue key="tooltipAnchor" value="ANCHOR_RIGHT" type="string"/>
			<KeyValue key="tooltipXOffset" value="0" type="number"/>
			<KeyValue key="tooltipYOffset" value="10" type="number"/>
		</KeyValues>

		<Layers>
			<Layer level="OVERLAY" textureSubLevel="2">
				<FontString parentKey="Description" inherits="GameFontNormalMed3" justifyH="CENTER" justifyV="MIDDLE">
					<Size x="85" y="50"/>
					<Anchors>
						<Anchor point="TOP" relativePoint="BOTTOM" x="0" y="3"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</CheckButton>

	<CheckButton name="CPActionButtonTemplate" inherits="CPButtonTemplate" mixin="CPActionButtonMixin" virtual="true">
		<Layers>
			<Layer level="ARTWORK" textureSubLevel="1">
				<Texture parentKey="FlyoutBorder" inherits="ActionBarFlyoutButton-IconFrame" hidden="true">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
				<Texture parentKey="FlyoutBorderShadow" inherits="ActionBarFlyoutButton-IconShadow" hidden="true">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="2">
				<Texture parentKey="FlyoutArrow" inherits="ActionBarFlyoutButton-ArrowUp" hidden="true"/>
				<FontString parentKey="HotKey" inherits="NumberFontNormalSmallGray" justifyH="RIGHT">
					<Size x="36" y="10"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="1" y="-3"/>
					</Anchors>
				</FontString>
				<FontString parentKey="Count" inherits="NumberFontNormal" justifyH="RIGHT">
					<Anchors>
						<Anchor point="BOTTOMRIGHT" x="-2" y="2"/>
					</Anchors>
				</FontString>
				<FontString parentKey="Page" inherits="NumberFontNormalYellow" justifyH="RIGHT" hidden="true">
					<Anchors>
						<Anchor point="BOTTOMLEFT" x="2" y="2"/>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="OVERLAY">
				<FontString parentKey="Name" inherits="GameFontHighlightSmallOutline">
					<Size x="36" y="10"/>
					<Anchors>
						<Anchor point="BOTTOM" x="0" y="2"/>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="1">
				<Texture parentKey="NewActionTexture" atlas="bags-newitem" useAtlasSize="false" alphaMode="ADD" hidden="true">
					<Size x="44" y="44"/>
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Cooldown parentKey="cooldown" inherits="CooldownFrameTemplate">
				<Size x="36" y="36"/>
				<Anchors>
					<Anchor point="CENTER" x="0" y="-1"/>
				</Anchors>
				<SwipeTexture>
					<Color r="1" g="1" b="1" a="0.8"/>
				</SwipeTexture>
			</Cooldown>
		</Frames>
	</CheckButton>
	
	<Button name="CPSmoothRectangleButtonTemplate" virtual="true" mixin="CPSmoothButtonMixin" inherits="BackdropTemplate">
		<Size x="230" y="60"/>
		<HighlightTexture parentKey="HighlightTexture" file="Interface\PVPFrame\PvPMegaQueue" alphaMode="ADD">
			<TexCoords left="0.00195313" right="0.63867188" top="0.70703125" bottom="0.76757813"/>
			<Anchors>
				<Anchor point="TOPLEFT" y="-4"/>
				<Anchor point="BOTTOMRIGHT" y="4"/>
			</Anchors>
		</HighlightTexture>
		<ButtonText parentKey="Label" inherits="Game12Font" justifyH="LEFT">
			<Size x="150"/>
			<Anchors>
				<Anchor point="LEFT" x="60" y="0"/>
			</Anchors>
		</ButtonText>
		<Layers>
			<Layer level="ARTWORK" textureSubLevel="1">
				<Texture parentKey="Icon">
					<Size x="40" y="40"/>
					<Anchors>
						<Anchor point="LEFT" x="12"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="2">
				<Texture parentKey="Mask" file="Interface\AddOns\ConsolePort\Assets\Textures\Button\Icon_Mask32">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent.Icon"/>
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent.Icon"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<MaskTexture parentKey="IconMask" file="Interface\AddOns\ConsolePort\Assets\Textures\Button\Mask">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent.Icon"/>
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent.Icon"/>
					</Anchors>
					<MaskedTextures>
						<MaskedTexture childKey="Icon"/>
					</MaskedTextures>
				</MaskTexture>
			</Layer>
		</Layers>
		<Frames>
			<Frame parentKey="Overlay" setAllPoints="true" inherits="BackdropTemplate"/>
			<Frame parentKey="Hilite" alpha="0" inherits="BackdropTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" x="-1"/>
					<Anchor point="BOTTOMRIGHT" x="1"/>
				</Anchors>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad method="OnLoad"/>
			<OnShow method="OnShow"/>
			<OnHide method="OnHide"/>
			<OnEnter method="OnEnter"/>
			<OnLeave method="OnLeave"/>
		</Scripts>
	</Button>

	<Frame name="CPResizeLayoutFrame" mixin="CPResizeLayoutMixin" virtual="true">
		<!--
		<KeyValues>
			Use fixedWidth/fixedHeight if you want a fixed size; otherwise size will be dynamically
			calculated based on the sizes of child frames
			<KeyValue key="fixedWidth" value="300" type="number"/>
			<KeyValue key="fixedHeight" value="300" type="number"/>
			<KeyValue key="minimumWidth" value="300" type="number"/>
			<KeyValue key="minimumHeight" value="300" type="number"/>
			<KeyValue key="maximumWidth" value="300" type="number"/>
			<KeyValue key="maximumHeight" value="300" type="number"/>
			<KeyValue key="widthPadding" value="300" type="number"/>
			<KeyValue key="heightPadding" value="300" type="number"/>
		</KeyValues>
		-->
		<Scripts>
			<OnShow method="Layout"/>
			<OnUpdate method="OnUpdate"/>
		</Scripts>
	</Frame>

	<Frame name="CPSelectionPopoutDetails" mixin="CPSelectionPopoutDetailsMixin" virtual="true">
		<Layers>
			<Layer level="ARTWORK" textureSubLevel="1">
				<FontString parentKey="SelectionNumber" font="GameFontNormal" justifyH="LEFT">
					<Size x="25" y="20"/>
					<Anchors>
						<Anchor point="LEFT"/>
					</Anchors>
				</FontString>
				<FontString parentKey="SelectionName" font="GameFontNormal" justifyH="LEFT"  maxLines="1" hidden="true">
					<Size x="25" y="20"/>
					<Anchors>
						<Anchor point="LEFT" relativeKey="$parent.SelectionNumber" relativePoint="RIGHT"/>
					</Anchors>
				</FontString>
				<Texture parentKey="ColorSwatch1" hidden="true">
					<Anchors>
						<Anchor point="LEFT" relativeKey="$parent.SelectionNumber" relativePoint="RIGHT"/>
					</Anchors>
				</Texture>
				<Texture parentKey="ColorSwatch2" hidden="true">
					<Size x="36" y="8"/>
					<Anchors>
						<Anchor point="LEFT" relativeKey="$parent.SelectionNumber" relativePoint="RIGHT" x="18" y="-2"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="2">
				<Texture parentKey="ColorSwatch1Glow" alphaMode="ADD" hidden="true">
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.ColorSwatch1" relativePoint="CENTER"/>
					</Anchors>
				</Texture>
				<Texture parentKey="ColorSwatch2Glow" alphaMode="ADD" hidden="true">
					<Size x="36" y="8"/>
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.ColorSwatch2" relativePoint="CENTER"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK" textureSubLevel="3">
				<Texture parentKey="ColorSelected" hidden="true">
					<Anchors>
						<Anchor point="LEFT" relativeKey="$parent.ColorSwatch1" relativePoint="LEFT" x="-4"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad method="OnLoad"/>
		</Scripts>
	</Frame>

	<Button name="CPSelectionPopoutEntryTemplate" inherits="CPResizeLayoutFrame" mixin="CPSelectionPopoutEntryMixin" virtual="true">
		<Size x="1" y="1"/>
		<ButtonText parentKey="ButtonText" setAllPoints="true"/>
		<KeyValues>
			<KeyValue key="widthPadding" value="14" type="number"/>
		</KeyValues>
		<Frames>
			<Frame parentKey="SelectionDetails" inherits="CPSelectionPopoutDetails">
				<Size x="144" y="20"/>
			</Frame>
			<Frame parentKey="HighlightBGTex" alpha="0" setAllPoints="true">
				<KeyValues>
					<KeyValue key="ignoreInLayout" value="true" type="boolean"/>
				</KeyValues>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture parentKey="Left">
							<Anchors>
								<Anchor point="TOPLEFT"/>
								<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" x="12"/>
							</Anchors>
						</Texture>
						<Texture parentKey="Right">
							<TexCoords left="1" right="0" top="0" bottom="1"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT"/>
								<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="-12"/>
							</Anchors>
						</Texture>
						<Texture parentKey="Middle">
							<Anchors>
								<Anchor point="TOPLEFT" relativeKey="$parent.Left" relativePoint="TOPRIGHT"/>
								<Anchor point="BOTTOMRIGHT" relativeKey="$parent.Right" relativePoint="BOTTOMLEFT"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad method="OnLoad"/>
			<OnClick method="OnClick"/>
			<OnEnter method="OnEnter"/>
			<OnLeave method="OnLeave"/>
		</Scripts>
	</Button>

	<Frame name="CPSelectionPopoutTemplate" inherits="CPResizeLayoutFrame" mixin="CPSelectionPopoutMixin" virtual="true">
		<Size x="1" y="1"/>
		<KeyValues>
			<KeyValue key="widthPadding" value="6" type="number"/>
			<KeyValue key="heightPadding" value="32" type="number"/>
		</KeyValues>

		<Frames>
			<Frame parentKey="Border" useParentLevel="true" inherits="NineSlicePanelTemplate">
				<KeyValues>
					<KeyValue key="layoutType" value="CharacterCreateDropdown" type="string"/>
				</KeyValues>
			</Frame>
		</Frames>

		<Scripts>
			<OnShow method="OnShow"/>
			<OnMouseWheel function="nop"/>
		</Scripts>
	</Frame>
	
	<Button name="CPSelectionPopoutButtonTemplate" mixin="CPSelectionPopoutButtonMixin" virtual="true">
		<Size x="150" y="38"/>
		<NormalTexture parentKey="NormalTexture"/>
		<HighlightTexture parentKey="HighlightTexture" alphaMode="ADD" alpha="0"/>
		<PushedTextOffset x="2" y="-2"/>
		<ButtonText parentKey="ButtonText">
			<Anchors>
				<Anchor point="TOPLEFT" x="10" y="-10"/>
				<Anchor point="BOTTOMRIGHT" x="-10" y="10"/>
			</Anchors>
		</ButtonText>
		<Frames>
			<Frame parentKey="SelectionDetails" inherits="CPSelectionPopoutDetails, CPResizeLayoutFrame" useParentLevel="true">
				<Size x="1" y="1"/>
			</Frame>
			<Frame parentKey="Popout" inherits="CPSelectionPopoutTemplate" hidden="true">
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" x="3" y="11"/>
				</Anchors>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad method="OnLoad"/>
			<OnHide method="OnHide"/>
			<OnClick method="OnClick"/>
			<OnMouseWheel method="OnMouseWheel"/>
			<OnEnter method="OnEnter"/>
			<OnLeave method="OnLeave"/>
		</Scripts>
	</Button>

	<Frame name="CPSelectionPopoutWithButtonsAndLabelTemplate" mixin="CPSelectionPopoutWithButtonsAndLabelMixin" virtual="true">
		<Size x="223" y="38"/>
		<Layers>
			<Layer level="ARTWORK">
				<FontString parentKey="Label" font="GameFontHighlightMed2">
					<Anchors>
						<Anchor point="RIGHT" relativeKey="$parent.DecrementButton" relativePoint="LEFT" x="-34"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button parentKey="SelectionPopoutButton" inherits="CPSelectionPopoutButtonTemplate">
				<Size x="150" y="38"/>
				<Anchors>
					<Anchor point="CENTER"/>
				</Anchors>
			</Button>
			<Button parentKey="IncrementButton" motionScriptsWhileDisabled="true">
				<Size x="32" y="32"/>
				<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.SelectionPopoutButton" relativePoint="RIGHT" x="4"/>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Increment();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
				<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
			</Button>
			<Button parentKey="DecrementButton" motionScriptsWhileDisabled="true">
				<Size x="32" y="32"/>
				<Anchors>
					<Anchor point="RIGHT" relativeKey="$parent.SelectionPopoutButton" relativePoint="LEFT" x="-5"/>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Decrement();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
				<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
			</Button>
		</Frames>
	</Frame>
</Ui>