<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>
		function ZSpellButtonOptions_Changed()
			if type(this.func) == "function" then
				this.func(this)
			end
		end
	</Script>
	<Frame name="ZSpellButtonAdvancedOptionTemplate" hidden="true" virtual="true">
		<Size>
			<AbsDimension x="250" y="22"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
		</Backdrop>
		<Frames>
			<Button name="$parentPlus" id="1">
				<Size>
					<AbsDimension x="15" y="15"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT">
						<Offset>
							<AbsDimension x="1" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<NormalTexture file="Interface\Buttons\UI-PlusButton-UP">
					<Size>
						<AbsDimension x="15" y="15"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT">
							<Offset>
								<AbsDimension x="3" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</NormalTexture>
				<HighlightTexture name="$parentHighlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
					<Size>
						<AbsDimension x="15" y="15"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT">
							<Offset>
								<AbsDimension x="3" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</HighlightTexture>
				<Scripts>
					<OnClick>
						ZSpellButtonOptions_Changed()
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentMinus" id="2">
				<Size>
					<AbsDimension x="17" y="17"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT">
						<Offset>
							<AbsDimension x="20" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
					<Size>
						<AbsDimension x="15" y="15"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</NormalTexture>
				<HighlightTexture name="$parentHighlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
					<Size>
						<AbsDimension x="15" y="15"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</HighlightTexture>
				<Scripts>
					<OnClick>
						ZSpellButtonOptions_Changed()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Layers>
			<Layer>
				<FontString name="$parentText" inherits="GameFontNormalSmall" text="text">
					<Anchors>
						<Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parent">
							<Offset><AbsDimension x="38" y="0"/></Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame>

	<Frame name="ZSpellButtonOptionsTemplate" toplevel="true" frameStrata="DIALOG" movable="true" enableMouse="true" hidden="true" parent="UIParent" virtual="true">
		<Size>
			<AbsDimension x="355" y="422"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="32"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
					<Size>
						<AbsDimension x="256" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="12"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString name="$parentHeaderText" inherits="GameFontNormal" text="Title">
					<Anchors>
						<Anchor point="TOP" relativeTo="$parentHeader">
							<Offset>
								<AbsDimension x="0" y="-14"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentButton" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="330" y="90"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="12" y="-38"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Slider name="$parentSizeSlider" inherits="OptionsSliderTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="5" y="-15"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnValueChanged>
								ZSpellButtonOptions_Changed()
							</OnValueChanged>
						</Scripts>
					</Slider>
					<Slider name="$parentCountSlider" inherits="OptionsSliderTemplate" id="2">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="5" y="-55"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnValueChanged>
								ZSpellButtonOptions_Changed()
							</OnValueChanged>
						</Scripts>
					</Slider>
					<CheckButton name="$parentHide" inherits="OptionsCheckButtonTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="170" y="-10"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								getglobal(this:GetName().."Text"):SetText("Hide Buttons On Click")
							</OnLoad>
							<OnClick>
								ZSpellButtonOptions_Changed()
							</OnClick>
						</Scripts>
					</CheckButton>
					<CheckButton name="$parentTip" inherits="OptionsCheckButtonTemplate" id="4">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="170" y="-50"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								getglobal(this:GetName().."Text"):SetText("Show Tooltip")
							</OnLoad>
							<OnClick>
								ZSpellButtonOptions_Changed()
							</OnClick>
						</Scripts>
					</CheckButton>
				</Frames>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentSizeText" inherits="GameFontNormal" text="36">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="140" y="-17"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="$parentCountText" inherits="GameFontNormal" text="6">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="140" y="-57"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.15, 0.15, 0.15);
						getglobal(this:GetName().."Title"):SetText("Spell Button Options");
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentMainButton" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="330" y="90"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="12" y="-145"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Slider name="$parentSizeSlider" inherits="OptionsSliderTemplate" id="3">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="5" y="-15"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnValueChanged>
								ZSpellButtonOptions_Changed()
							</OnValueChanged>
						</Scripts>
					</Slider>
					<CheckButton name="$parentHide" inherits="OptionsCheckButtonTemplate" id="2">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="170" y="-10"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								getglobal(this:GetName().."Text"):SetText("Hide Button")
							</OnLoad>
							<OnClick>
								ZSpellButtonOptions_Changed()
							</OnClick>
						</Scripts>
					</CheckButton>
					<CheckButton name="$parentCircle" inherits="OptionsCheckButtonTemplate" id="3">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="5" y="-50"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								getglobal(this:GetName().."Text"):SetText("Use Circle Button")
							</OnLoad>
							<OnClick>
								ZSpellButtonOptions_Changed()
							</OnClick>
						</Scripts>
					</CheckButton>
				</Frames>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentSizeText" inherits="GameFontNormal" text="36">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="140" y="-17"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.15, 0.15, 0.15);
						getglobal(this:GetName().."Title"):SetText("Main Button Options");
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentGraphic" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="330" y="134"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="12" y="-254"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Slider name="$parentRowsSlider" inherits="OptionsSliderTemplate" id="4">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="5" y="-15"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnValueChanged>
								ZSpellButtonOptions_Changed()
							</OnValueChanged>
						</Scripts>
					</Slider>
					<Frame name="$parentHorizontalDropDown" inherits="UIDropDownMenuTemplate" enableMouse="true" id="1">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="-8" y="-57"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="Buttons Expand">
									<Anchors>
										<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
											<Offset>
												<AbsDimension x="21" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								ZSpellButtonOptions_Changed()
							</OnLoad>
							<OnShow>
								ZSpellButtonOptions_Changed()
							</OnShow>
						</Scripts>
					</Frame>
					<Frame name="$parentVerticalDropDown" inherits="UIDropDownMenuTemplate" enableMouse="true" id="2">
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentHorizontalDropDown" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="100" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								ZSpellButtonOptions_Changed()
							</OnLoad>
							<OnShow>
								ZSpellButtonOptions_Changed()
							</OnShow>
						</Scripts>
					</Frame>
					<Frame name="$parentFirstButtonDropDown" inherits="UIDropDownMenuTemplate" enableMouse="true" id="1">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="-8" y="-99"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="First Button Position">
									<Anchors>
										<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
											<Offset>
												<AbsDimension x="21" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								ZSpellButtonOptions_Changed()
							</OnLoad>
							<OnShow>
								ZSpellButtonOptions_Changed()
							</OnShow>
						</Scripts>
					</Frame>
				</Frames>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentRowsText" inherits="GameFontNormal" text="1">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="140" y="-17"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.15, 0.15, 0.15);
						getglobal(this:GetName().."Title"):SetText("Graphical Layout");
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentAdvanced" hidden="true" inherits="OptionFrameBoxTemplate" id="1">
				<Size>
					<AbsDimension x="330" y="350"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="12" y="-38"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<FontString name="$parentOrderText" inherits="GameFontNormal" text="Adjust the order in which to display the buttons.">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset>
										<AbsDimension x="8" y="-8"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Frame name="$parentOrder1" inherits="ZSpellButtonAdvancedOptionTemplate" id="1">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="5" y="-25"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder2" inherits="ZSpellButtonAdvancedOptionTemplate" id="2">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder1" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder3" inherits="ZSpellButtonAdvancedOptionTemplate" id="3">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder2" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder4" inherits="ZSpellButtonAdvancedOptionTemplate" id="4">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder3" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder5" inherits="ZSpellButtonAdvancedOptionTemplate" id="5">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder4" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder6" inherits="ZSpellButtonAdvancedOptionTemplate" id="6">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder5" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder7" inherits="ZSpellButtonAdvancedOptionTemplate" id="7">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder6" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder8" inherits="ZSpellButtonAdvancedOptionTemplate" id="8">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder7" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder9" inherits="ZSpellButtonAdvancedOptionTemplate" id="9">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder8" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder10" inherits="ZSpellButtonAdvancedOptionTemplate" id="10">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder9" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder11" inherits="ZSpellButtonAdvancedOptionTemplate" id="11">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder10" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
					<Frame name="$parentOrder12" inherits="ZSpellButtonAdvancedOptionTemplate" id="12">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentOrder11" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
					</Frame>
				</Frames>
				<Scripts>
					<OnLoad>
						this:SetBackdropBorderColor(0.4, 0.4, 0.4);
						this:SetBackdropColor(0.15, 0.15, 0.15);
						getglobal(this:GetName().."Title"):SetText("Advanced Options");
					</OnLoad>
				</Scripts>
			</Frame>
			<Button name="$parentBasicButton" inherits="OptionsButtonTemplate" text="Basic">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="12" y="14"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						getglobal(this:GetParent():GetName().."Button"):Show()
						getglobal(this:GetParent():GetName().."MainButton"):Show()
						getglobal(this:GetParent():GetName().."Graphic"):Show()
						getglobal(this:GetParent():GetName().."Advanced"):Hide()
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentAdvancedButton" inherits="OptionsButtonTemplate" text="Advanced" id="1">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="102" y="14"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						getglobal(this:GetParent():GetName().."Button"):Hide()
						getglobal(this:GetParent():GetName().."MainButton"):Hide()
						getglobal(this:GetParent():GetName().."Graphic"):Hide()
						getglobal(this:GetParent():GetName().."Advanced"):Show()
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentOkayButton" inherits="OptionsButtonTemplate" text="Okay">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-12" y="14"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						this:GetParent():Hide()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				this:RegisterForDrag("LeftButton")
			</OnLoad>
			<OnMouseUp>
				if ( this.isMoving ) then
					this:StopMovingOrSizing();
					this.isMoving = false;
				end
			</OnMouseUp>
			<OnDragStart>
				this:StartMoving();
				this.isMoving = true;
			</OnDragStart>
			<OnDragStop>
				this:StopMovingOrSizing();
				this.isMoving = false;
			</OnDragStop>
		</Scripts>
	</Frame>
</Ui>