<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="localization.lua"/>
	<Script file="ADOptions.lua"/>
  <CheckButton name="ADCheckButtonTemplate" inherits="OptionsCheckButtonTemplate" virtual="true">
		<Scripts>
			<OnClick>
				if ( this:GetChecked() ) then
					PlaySound("igMainMenuOptionCheckBoxOff");
				else
					PlaySound("igMainMenuOptionCheckBoxOn");
				end
				ADOptionsFrame_OnClick();
			</OnClick>
		</Scripts>
	</CheckButton>

	<Frame name="ADOptionsFrame" toplevel="true" frameStrata="MEDIUM" movable="true" enableMouse="true" hidden="true" parent="UIParent">
		<Size>
			<AbsDimension x="300" y="360"/>
		</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="ADOptionsFrameHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
					<Size>
						<AbsDimension x="384" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="12"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>

				<FontString inherits="GameFontNormal" text="AD_DIALOG_HEADER">
					<Anchors>
						<Anchor point="TOP" relativeTo="ADOptionsFrameHeader">
							<Offset>
								<AbsDimension x="0" y="-14"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>

    <frames>
			<Frame name="AD_TogglesBorder" inherits="OptionFrameBoxTemplate">
				<Size>
					<AbsDimension x="270" y="95"/>
				</Size>
				<Anchors>
					<Anchor point="TOP">
						<Offset>
							<AbsDimension x="0" y="-45"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
				  <Layer level="ARTWORK">
				  <Texture name="AD_TogglesBorderHeader" file="Interface\DialogFrame\UI-DialogBox-Header">
					<Size>
						<AbsDimension x="400" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOP" relativeTo="AD_TogglesBorder">
							<Offset>
								<AbsDimension x="0" y="12"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>

				<FontString inherits="GameFontNormal" text="AD_DIALOG_CHECKHEADER">
					<Anchors>
						<Anchor point="TOP" relativeTo="AD_TogglesBorderHeader">
							<Offset>
							   <AbsDimension x="0" y="-14"/>
<!--								<AbsDimension x="20" y="-30"/> -->
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				</Layer>
				</Layers>

				<Scripts>
					<OnLoad>
						this:SetBackdropColor(240,240,240)
					</OnLoad>
				</Scripts>
        <frames>
					<CheckButton name="ADOptionsFrame_CheckButton1" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="20" y="-30"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ADOptionsFrame_CheckButton2" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="ADOptionsFrame_CheckButton1" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="7"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ADOptionsFrame_CheckButton3" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP">
								<Offset>
									<AbsDimension x="20" y="-30"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ADOptionsFrame_CheckButton4" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="ADOptionsFrame_CheckButton3" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="7"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
        </frames>
  	  </Frame>


					<CheckButton name="ADOptionsFrame_CheckButton5" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="ADOptionsFrame_CheckButton2" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="-17"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ADOptionsFrame_CheckButton6" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="ADOptionsFrame_CheckButton5" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="7"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ADOptionsFrame_CheckButton7" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="ADOptionsFrame_CheckButton6" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="7"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ADOptionsFrame_CheckButton8" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="ADOptionsFrame_CheckButton7" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="-17"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>
					<CheckButton name="ADOptionsFrame_CheckButton9" inherits="ADCheckButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeTo="ADOptionsFrame_CheckButton8" relativePoint="BOTTOM">
								<Offset>
									<AbsDimension x="0" y="7"/>
								</Offset>
							</Anchor>
						</Anchors>
					</CheckButton>

    			<Button name="ADOptionsFrameCancel" inherits="OptionsButtonTemplate" text="AD_BUTTON_CANCEL">
				<Anchors>
<!--
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-13" y="16"/>
						</Offset>
					</Anchor>
-->
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-60" y="16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						PlaySound("gsTitleOptionExit");
						ADOptionsFrame:Hide();
					</OnClick>
				</Scripts>
		    	</Button>
			    <Button name="ADOptionsFrameOkay" inherits="OptionsButtonTemplate" text="AD_BUTTON_OKAY">
				<Anchors>
					<Anchor point="RIGHT" relativeTo="ADOptionsFrameCancel" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						PlaySound("gsTitleOptionOK");
						ADOptionsFrame_SaveOptions();
						ADOptionsFrame:Hide();
					</OnClick>
				</Scripts>
			    </Button>
<!--
			<Button name="ADOptionsFrameDefaults" inherits="OptionsButtonTemplate" text="DEFAULTS">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="13" y="16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						PlaySound("igMainMenuOptionCheckBoxOn");
						ADOptionsFrame_GetDefaults();
					</OnClick>
					<OnEnter>
						GameTooltip_AddNewbieTip("Clear Settings", 1.0, 1.0, 1.0, "-Warning-\n\nClicking this will reset your AutoDecline settings to defaults.");
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Button>
-->
    </frames>
		<Scripts>
			<OnLoad>
				ADOptionsFrame_OnLoad();
			</OnLoad>
			<OnShow>
				ADOptionsFrame_OnShow();
			</OnShow>
		</Scripts>
	</Frame>
</Ui>