<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/
C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
	<Script file="Nurfed_Options.lua"/>

	<!-- Slider Template -->
	<Slider name="Nurfed_SliderTemplate" inherits="OptionsSliderTemplate" hidden="true" virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentValue" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
					<Color r="0" g="1" b="1"/>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnShow>
				local func = getglobal(this:GetParent():GetName().."SliderOnShow");
				func();
			</OnShow>
			<OnValueChanged>
				local func = getglobal(this:GetParent():GetName().."SliderOnValueChanged");
				func();
			</OnValueChanged>
			<OnEnter>
				this.tip = 1;
			</OnEnter>
			<OnLeave>
				this.tip = 0;
			</OnLeave>
		</Scripts>
	</Slider>

	<!-- Check Template -->
	<CheckButton name="Nurfed_CheckTemplate" inherits="OptionsCheckButtonTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="20" y="20"/>
		</Size>
		<Scripts>
			<OnShow>
				local func = getglobal(this:GetParent():GetName().."CheckOnShow");
				func();
			</OnShow>
			<OnClick>
				local func = getglobal(this:GetParent():GetName().."CheckOnClick");
				func();
			</OnClick>
		</Scripts>
		<HitRectInsets>
			<AbsInset left="0" right="0" top="0" bottom="0"/>
		</HitRectInsets>
	</CheckButton>

	<!-- Color Picker Template -->
	<Button name="Nurfed_ColorSwatchTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="16" y="16"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parent_SwatchBg">
					<Size>
						<AbsDimension x="14" y="14"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1.0" g="1.0" b="1.0"/>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="RIGHT" relativePoint="LEFT">
							<Offset>
								<AbsDimension x="-1" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnShow>
				local func = getglobal(this:GetParent():GetName().."SwatchOnShow");
				func();
			</OnShow>
			<OnClick>
				Nurfed_OpenColorPicker();
			</OnClick>
			<OnEnter>
				getglobal(this:GetName().."_SwatchBg"):SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
			</OnEnter>
			<OnLeave>
				getglobal(this:GetName().."_SwatchBg"):SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
			</OnLeave>
		</Scripts>
		<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch"/>
	</Button>

	<!-- Option Cycle Template -->
	<Frame name="Nurfed_CycleTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="135" y="20"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentPrev">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local func = getglobal(this:GetParent():GetParent():GetName().."CyclePrevOnClick");
						func();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
				<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
			</Button>
			<Button name="$parentNext">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local func = getglobal(this:GetParent():GetParent():GetName().."CycleNextOnClick");
						func();
					</OnClick>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
				<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
			</Button>
		</Frames>
		<Scripts>
			<OnShow>
				local func = getglobal(this:GetParent():GetName().."CycleOnShow");
				func();
			</OnShow>
		</Scripts>
	</Frame>

	<!-- Options Input Template -->
	<Frame name="Nurfed_InputTemplate" framestrata="MEDIUM" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="135" y="30"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="3" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1.0" g="1.0" b="1.0"/>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<EditBox name="$parentInput" autoFocus="false">
				<Size>
					<AbsDimension x="103" y="18"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="10"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="3" right="3" top="3" bottom="3"/>
					</BackgroundInsets>
				</Backdrop>
				<Scripts>
					<OnEscapePressed>
						this:ClearFocus();
					</OnEscapePressed>
				</Scripts>
				<FontString inherits="GameFontNormal"/>
				<TextInsets left="3" right="9" top="0" bottom="0"/>
			</EditBox>
			<Button name="$parentSet" inherits="UIPanelButtonTemplate" text="NURFEDSET">
				<Size>
					<AbsDimension x="30" y="18"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentInput" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						local func = getglobal(this:GetParent():GetParent():GetName().."SetInput");
						func();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnShow>
				local input = getglobal(this:GetName().."Input");
				input:SetBackdropColor(0, 0, 0, 0.75);
				local func = getglobal(this:GetParent():GetName().."InputOnShow");
				func();
			</OnShow>
		</Scripts>
	</Frame>

	<!-- Options Tab Template -->
	<Button name="Nurfed_TabTemplate" virtual="true">
		<Size>
			<AbsDimension x="115" y="32"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentLeftDisabled" file="Interface\PaperDollInfoFrame\UI-Character-ActiveTab">
					<Size>
						<AbsDimension x="20" y="32"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="5"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="0.15625" top="0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentMiddleDisabled" file="Interface\PaperDollInfoFrame\UI-Character-ActiveTab">
					<Size>
						<AbsDimension x="88" y="32"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentLeftDisabled" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.15625" right="0.84375" top="0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentRightDisabled" file="Interface\PaperDollInfoFrame\UI-Character-ActiveTab">
					<Size>
						<AbsDimension x="20" y="32"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentMiddleDisabled" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.84375" right="1.0" top="0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentLeft" file="Interface\PaperDollInfoFrame\UI-Character-InActiveTab">
					<Size>
						<AbsDimension x="20" y="32"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
					<TexCoords left="0" right="0.15625" top="0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentMiddle" file="Interface\PaperDollInfoFrame\UI-Character-InActiveTab">
					<Size>
						<AbsDimension x="88" y="32"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.15625" right="0.84375" top="0" bottom="1.0"/>
				</Texture>
				<Texture name="$parentRight" file="Interface\PaperDollInfoFrame\UI-Character-InActiveTab">
					<Size>
						<AbsDimension x="20" y="32"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.84375" right="1.0" top="0" bottom="1.0"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				this:SetFrameLevel(this:GetFrameLevel() + 4);
			</OnLoad>
			<OnClick>
				PanelTemplates_Tab_OnClick(this:GetParent());
				local func = getglobal(this:GetParent():GetName().."_TabOnClick");
				func();
			</OnClick>
			<OnShow>
				PanelTemplates_TabResize(0);
				getglobal(this:GetName().."HighlightTexture"):SetWidth(this:GetTextWidth() + 30);
			</OnShow>
		</Scripts>
		<NormalText name="$parentText" inherits="GameFontNormalSmall">
			<Anchors>
				<Anchor point="CENTER">
					<Offset>
						<AbsDimension x="0" y="2"/>
					</Offset>
				</Anchor>
			</Anchors>
		</NormalText>
		<HighlightText name="$parentHighlightText" inherits="GameFontHighlightSmall">
			<Anchors>
				<Anchor point="CENTER">
					<Offset>
						<AbsDimension x="0" y="2"/>
					</Offset>
				</Anchor>
			</Anchors>
		</HighlightText>
		<DisabledText name="$parentDisabledText" inherits="GameFontHighlightSmall">
			<Anchors>
				<Anchor point="CENTER">
					<Offset>
						<AbsDimension x="0" y="2"/>
					</Offset>
				</Anchor>
			</Anchors>
		</DisabledText>
		<HighlightTexture name="$parentHighlightTexture" file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="LEFT">
					<Offset>
						<AbsDimension x="10" y="2"/>
					</Offset>
				</Anchor>
				<Anchor point="RIGHT">
					<Offset>
						<AbsDimension x="-10" y="2"/>
					</Offset>
				</Anchor>
			</Anchors>
		</HighlightTexture>
	</Button>

	<!-- Options Frame Template -->
	<Frame name="Nurfed_OptionsFrameTemplate" frameStrata="LOW" toplevel="true" hidden="true" parent="UIParent" virtual="true">
		<Anchors>
			<Anchor point="CENTER">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				Nurfed_Options_OnLoad();
			</OnLoad>
			<OnShow>
				Nurfed_Options_OnShow();
			</OnShow>
		</Scripts>
		<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Frames>
			<Frame name="$parentFrame">
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="0" y="-4"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						Nurfed_OptionsFrame_OnLoad();
					</OnLoad>
				</Scripts>
				<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentHeadline" inherits="GameFontNormal">
							<Size>
								<AbsDimension x="280" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="TOP">
									<Offset>
										<AbsDimension x="0" y="-5"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="$parentText1" inherits="GameFontNormalSmall">
							<Size>
								<AbsDimension x="280" y="20"/>
							</Size>
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="5"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Frame>
			<Button name="$parentButton1" inherits="GameMenuButtonTemplate">
				<Size>
					<AbsDimension x="80" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM">
						<Offset>
							<AbsDimension x="0" y="5"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						HideUIPanel(this:GetParent());
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentButton2" inherits="GameMenuButtonTemplate">
				<Size>
					<AbsDimension x="80" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM">
						<Offset>
							<AbsDimension x="0" y="5"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						HideUIPanel(this:GetParent());
						local func = getglobal(this:GetParent():GetName().."_Reset");
						func();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>
</Ui>
