<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="OptionFrame.lua"/>	
	
	<CheckButton name="CVCheckButtonTemplate" virtual="true">
      <Size>
         <AbsDimension x="24" y="24"/>
      </Size>
      <HitRectInsets>
         <AbsInset left="0" right="0" top="0" bottom="0"/>
      </HitRectInsets>
      <Layers>
         <Layer level="ARTWORK">
            <FontString name="$parentText" inherits="ChatFontNormal" text="">
            <Color r=".9" g=".9" b=".9"/>
               <Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
			   </FontString>
         </Layer>
      </Layers>
      <Scripts>
         <OnLoad>
            getglobal(this:GetName().."Text"):SetText( CharactersViewer.OptionFrame.GetOption(this:GetID(), "TEXT" ))
			</OnLoad>
         <OnClick>
            if ( this:GetChecked() ) then
               PlaySound("igMainMenuOptionCheckBoxOn");
            else
               PlaySound("igMainMenuOptionCheckBoxOff");
            end
				CharactersViewer.OptionFrame.CheckButton.OnClick(this);
         </OnClick>
         <OnEnter>
            if ( this.tooltipText ) then
               GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
               GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1);
            end
            if ( this.tooltipRequirement ) then
               GameTooltip:AddLine(this.tooltipRequirement, "", 1.0, 1.0, 1.0);
               GameTooltip:Show();
            end
            --CastPartyOptionsSetTooltip(this:GetID());
				--CharactersViewer.OptionFrame.test();
         </OnEnter>
         <OnLeave>
            GameTooltip:Hide();
         </OnLeave>
      </Scripts>
		<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
		<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
		<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
		<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
		<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
   </CheckButton>
	

	<Frame name="CVOptionFrame" setAllPoints="true" enableMouse="true" parent="CVCharacterFrame" hidden="true" id="7">
		<HitRectInsets>
			<AbsInset left="0" right="30" top="0" bottom="75"/>
		</HitRectInsets>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="2" y="-1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-TopRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="258" y="-1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomLeft">
					<Size>
						<AbsDimension x="256" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="2" y="-257"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture file="Interface\PaperDollInfoFrame\UI-Character-General-BottomRight">
					<Size>
						<AbsDimension x="128" y="256"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="258" y="-257"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>	
			<CheckButton name="CVCheckOption1" inherits="CVCheckButtonTemplate" id = "1">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="CVOptionFrame" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="40" y="-75"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="CVCheckOption2" inherits="CVCheckButtonTemplate" id = "2">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="CVCheckOption1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-3"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="CVCheckOption3" inherits="CVCheckButtonTemplate" id = "3">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="CVCheckOption2" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-3"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnHide>
				if ( CVCharacterFrame.isMoving ) then
					CVCharacterFrame:StopMovingOrSizing();
					CVCharacterFrame.isMoving = false;
				end
				if ( CPOptionFrame ) then
					CPOptionFrame:Hide();
				end
			</OnHide>
			<OnMouseUp>
				if ( CVCharacterFrame.isMoving ) then
					CVCharacterFrame:StopMovingOrSizing();
					CVCharacterFrame.isMoving = false;
				end
			</OnMouseUp>
			<OnMouseDown>
				if ( ( ( not CVCharacterFrame.isLocked ) or ( CVCharacterFrame.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
					CVCharacterFrame:StartMoving();
					CVCharacterFrame.isMoving = true;
				end
			</OnMouseDown>   
			<OnShow>
				CharactersViewer.OptionFrame.ReDraw();
				if ( CPOptionFrame ) then
					CPOptionFrame:SetPoint("TOPLEFT", "CVCharacterFrame", "TOPRIGHT", 0, 0);
					CPOptionFrame:Show();
				end
			</OnShow>
		</Scripts>
	</Frame>
</Ui>
