<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="AlertFrames.lua"/>

<Frame name="AlertFrameTemplate" virtual="true">
	<Scripts>
		<OnEnter>AlertFrame_StopOutAnimation(this)</OnEnter>
		<OnLeave>AlertFrame_ResumeOutAnimation(this)</OnLeave>
	</Scripts>
</Frame>

<Button name="AchievementAlertFrameTemplate" parent="UIParent" hidden="true" frameStrata="DIALOG" virtual="true" inherits="AlertFrameTemplate">
	<Size>
		<AbsDimension x="300" y="88"/>
	</Size>
	<Anchors>
		<Anchor point="BOTTOM">
			<Offset>
				<AbsDimension x="0" y="128"/>
			</Offset>
		</Anchor>
	</Anchors>
	<Layers>
		<Layer level="BACKGROUND">
			<Texture name="$parentBackground" file="Interface\AddOns\Achiever\textures\UI-Achievement-Alert-Background">
				<Anchors>
					<Anchor point="TOPLEFT"/>
					<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
				<TexCoords left="0" right=".605" top="0" bottom=".703"/>
			</Texture>
			<FontString name="$parentUnlocked" inherits="GameFontNormalSmall" text="ACHIEVEMENT_UNLOCKED">
				<Size x="200" y="12"/>
				<Anchors>
					<Anchor point="TOP">
						<Offset x="7" y="-23"/>
					</Anchor>
				</Anchors>
			</FontString>
			<FontString name="$parentName" inherits="GameFontHighlight" text="For the Alliance!">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset x="72" y="36"/>
					</Anchor>
					<Anchor point="BOTTOMRIGHT">
						<Offset x="-60" y="36"/>
					</Anchor>
				</Anchors>
				<Size x="240" y="16"/>
			</FontString>
		</Layer>
		<Layer level="OVERLAY">
			<Texture name="$parentGlow" file="Interface\AddOns\Achiever\textures\UI-Achievement-Alert-Glow" alphaMode="ADD" alpha="0" parentKey="glow">
				<Size>
					<AbsDimension x="400" y="171"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<TexCoords left="0" right="0.78125" top="0" bottom="0.66796875"/>
			</Texture>
			<Texture name="$parentShine" file="Interface\AddOns\Achiever\textures\UI-Achievement-Alert-Glow" alphaMode="ADD" alpha="0" parentKey="shine">
				<Size>
					<AbsDimension x="67" y="72"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset x="0" y="8"/>
					</Anchor>
				</Anchors>
				<TexCoords left="0.78125" right="0.912109375" top="0" bottom="0.28125"/>
			</Texture>
		</Layer>
	</Layers>
	<Frames>
		<Frame name="$parentIcon" inherits="AchievementIconFrameTemplate">
			<Size>
				<AbsDimension x="124" y="124"/>
			</Size>
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset>
						<AbsDimension x="-26" y="16"/>
					</Offset>
				</Anchor>
			</Anchors>
			<Layers>
				<Layer level="BACKGROUND">
					<Texture name="$parentBackfill" file="Interface\AddOns\Achiever\textures\UI-Achievement-IconFrame-Backfill" hidden="true">
						<Anchors>
							<Anchor point="CENTER"/>
						</Anchors>
						<Size>
							<AbsDimension x="64" y="64"/>
						</Size>
					</Texture>
				</Layer>
				<Layer level="BORDER">
					<Texture name="$parentBling" file="Interface\AddOns\Achiever\textures\UI-Achievement-Bling" hidden="true">
						<Anchors>
							<Anchor point="CENTER">
								<Offset>
									<AbsDimension x="-1" y="1"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Size>
							<AbsDimension x="116" y="116"/>
						</Size>
					</Texture>
				</Layer>
				<Layer level="ARTWORK">
					<Texture name="$parentTexture">
						<Anchors>
							<Anchor point="CENTER">
								<Offset>
									<AbsDimension x="0" y="3"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Size>
							<AbsDimension x="50" y="50"/>
						</Size>
					</Texture>
				</Layer>
				<Layer level="OVERLAY">
					<Texture name="$parentOverlay" file="Interface\AddOns\Achiever\textures\UI-Achievement-IconFrame">
						<Anchors>
							<Anchor point="CENTER">
								<Offset>
									<AbsDimension x="-1" y="2"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Size>
							<AbsDimension x="72" y="72"/>
						</Size>
						<TexCoords left="0" right="0.5625" top="0" bottom="0.5625"/>
					</Texture>
				</Layer>
			</Layers>
			<Scripts>
				<OnLoad>
					local _G, _ = _G or getfenv()
					local name = this:GetName();
					this.bling = _G[name .. "Bling"];
					this.texture = _G[name .. "Texture"];
					this.frame = _G[name .. "Overlay"];

					this.Desaturate =
						function (this)
							this.bling:SetVertexColor(.6, .6, .6, 1);
							this.frame:SetVertexColor(.75, .75, .75, 1);
							this.texture:SetVertexColor(.55, .55, .55, 1);
						end

					this.Saturate =
						function (this)
							this.bling:SetVertexColor(1, 1, 1, 1);
							this.frame:SetVertexColor(1, 1, 1, 1);
							this.texture:SetVertexColor(1, 1, 1, 1);
						end
				</OnLoad>
			</Scripts>
		</Frame>
		<Frame name="$parentShield">
			<Size>
				<AbsDimension x="64" y="64"/>
			</Size>
			<Anchors>
				<Anchor point="TOPRIGHT">
					<Offset>
						<AbsDimension x="-10" y="-13"/>
					</Offset>
				</Anchor>
			</Anchors>
			<Layers>
				<Layer level="BACKGROUND">
					<Texture name="$parentIcon" file="Interface\AddOns\Achiever\textures\UI-Achievement-Shields">
						<Size>
							<AbsDimension x="52" y="48"/>
						</Size>
						<Anchors>
							<Anchor point="TOPRIGHT">
								<Offset>
									<AbsDimension x="1" y="-6"/>
								</Offset>
							</Anchor>
						</Anchors>
						<TexCoords left="0" right=".5" top="0" bottom=".9"/>
					</Texture>
				</Layer>
				<Layer level="OVERLAY">
					<FontString name="$parentPoints" inherits="GameFontNormal">
						<Anchors>
							<Anchor point="CENTER">
								<Offset>
									<AbsDimension x="7" y="2"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Size>
							<AbsDimension x="64" y="64"/>
						</Size>
					</FontString>
				</Layer>
			</Layers>
			<Scripts>
				<OnLoad>
					AchievementShield_OnLoad(this);
				</OnLoad>
			</Scripts>
		</Frame>
	</Frames>
	<Scripts>
		<OnLoad>
			AchievementAlertFrame_OnLoad(this);
		</OnLoad>
		<OnClick>
			AchievementAlertFrame_OnClick(this, button, down);
		</OnClick>
		<OnHide function="AchievementAlertFrame_OnHide"/>
	</Scripts>
</Button>

<Frame name="AlertFrame" parent="UIParent" hidden="true"></Frame>

</Ui>