<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="DuelInspect.lua"/>
	<Script file="localization.lua"/>






  <Frame name="DuelInspect_UnitBuffFrameTemplate" virtual="true">
      <Size>
          <AbsDimension x="25" y="23"/>
      </Size>
  </Frame>
	<Frame name="DuelInspect_UnitBuffFrame" parent="StaticPopup1" hidden="true">
		<Size>
			<AbsDimension x="60" y="235"/>
		</Size>
		<Anchors>
			<Anchor point="TOP" relativeTo="$parent" relativePoint="TOPLEFT">
				<Offset>
					<AbsDimension x="46" y="75"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Frames>
			<Frame name="DuelInspect_Buff1Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_UnitBuffFrame" relativePoint="LEFT"/>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff1Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(1);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Buff2Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff1Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff2Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(2);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Buff3Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff2Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff3Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(3);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Buff4Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff3Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff4Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(4);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Buff5Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff4Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-10"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff5Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(5);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>	
			<Frame name="DuelInspect_Buff6Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff1Frame" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff6Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(6);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Buff7Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff6Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff7Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(7);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>			
			<Frame name="DuelInspect_Buff8Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff7Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff8Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(8);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>				
			<Frame name="DuelInspect_Buff9Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff8Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff9Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(9);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>	
			<Frame name="DuelInspect_Buff10Frame" inherits="DuelInspect_UnitBuffFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Buff9Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="DuelInspect_Buff10Texture" file=""/>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						DuelInspect_ShowBuffTooltip(10);
					</OnEnter>
					<OnLeave>
			    	GameTooltip:Hide();
			    </OnLeave>
				</Scripts>
			</Frame>				
		</Frames>
	</Frame>









  <Frame name="DuelInspect_ResistanceFrameTemplate" virtual="true">
      <Size>
          <AbsDimension x="28" y="26"/>
      </Size>
	<Scripts>
		<OnEnter>
			if ( this.tooltip ) then
				GameTooltip:SetOwner(this,"ANCHOR_RIGHT");
				GameTooltip:SetText(this.tooltip, 1.0,1.0,1.0);
				GameTooltip:AddLine(this.tooltipSubtext, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1);
				GameTooltip:Show();
			end
		</OnEnter>
		<OnLeave>
    	GameTooltip:Hide();
    </OnLeave>
	</Scripts>
  </Frame>
	<Frame name="DuelInspect_ResistanceFrame" parent="StaticPopup1" hidden="true">
		<Size>
			<AbsDimension x="30" y="235"/>
		</Size>
		<Anchors>
			<Anchor point="TOP" relativeTo="$parent" relativePoint="TOPRIGHT">
				<Offset>
					<AbsDimension x="-31" y="75"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Frames>
			<Frame name="DuelInspect_Res_ARCRES_Frame" inherits="DuelInspect_ResistanceFrameTemplate">
				<Anchors>
					<Anchor point="RIGHT" relativeTo="DuelInspect_ResistanceFrame" relativePoint="RIGHT"/>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
							<TexCoords left="0" right="1.0" top="0.2265625" bottom="0.33984375"/>
						</Texture>
						<FontString name="DuelInspect_Res_ARCRES_Text" inherits="NumberFontNormal">
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="4"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this.tooltip = DI_RESISTANCES["ARCRES"];
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Res_FIRERES_Frame" inherits="DuelInspect_ResistanceFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Res_ARCRES_Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
							<TexCoords left="0" right="1.0" top="0" bottom="0.11328125"/>
						</Texture>
						<FontString name="DuelInspect_Res_FIRERES_Text" inherits="NumberFontNormal">
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="4"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this.tooltip = DI_RESISTANCES["FIRERES"];
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Res_NATRES_Frame" inherits="DuelInspect_ResistanceFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Res_FIRERES_Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
							<TexCoords left="0" right="1.0" top="0.11328125" bottom="0.2265625"/>
						</Texture>
						<FontString name="DuelInspect_Res_NATRES_Text" inherits="NumberFontNormal">
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="4"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this.tooltip = DI_RESISTANCES["NATRES"];
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Res_FROSTRES_Frame" inherits="DuelInspect_ResistanceFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Res_NATRES_Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
							<TexCoords left="0" right="1.0" top="0.33984375" bottom="0.453125"/>
						</Texture>
						<FontString name="DuelInspect_Res_FROSTRES_Text" inherits="NumberFontNormal">
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="4"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this.tooltip = DI_RESISTANCES["FROSTRES"];
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="DuelInspect_Res_SHADRES_Frame" inherits="DuelInspect_ResistanceFrameTemplate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="DuelInspect_Res_FROSTRES_Frame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-13"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture file="Interface\PaperDollInfoFrame\UI-Character-ResistanceIcons">
							<TexCoords left="0" right="1.0" top="0.453125" bottom="0.56640625"/>
						</Texture>
						<FontString name="DuelInspect_Res_SHADRES_Text" inherits="NumberFontNormal">
							<Anchors>
								<Anchor point="BOTTOM">
									<Offset>
										<AbsDimension x="0" y="4"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						this.tooltip = DI_RESISTANCES["SHADRES"];
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
	</Frame>




	<Frame name="DuelInspect_ItemQualityFrame" parent="StaticPopup1" hidden="true">
		<Size>
			<AbsDimension x="175" y="13"/>
		</Size>
		<Anchors>
			<Anchor point="TOP" relativeTo="StaticPopup1Text" relativePoint="BOTTOM">
				<Offset>
					<AbsDimension x="0" y="-13"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="DIALOG">
				<FontString name="DuelInspect_ItemQualityFrameText" inherits="GameFontNormal" hidden="false">
					<Size>
						<AbsDimension x="0" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>		
	</Frame>






	<Frame name="DuelInspect_UseItem1Frame" parent="StaticPopup1" hidden="true">
		<Size>
			<AbsDimension x="175" y="13"/>
		</Size>
		<Anchors>
			<Anchor point="TOP" relativeTo="DuelInspect_ItemQualityFrame" relativePoint="BOTTOM">
				<Offset>
					<AbsDimension x="0" y="-13"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="DIALOGUE">
				<FontString name="DuelInspect_UseItem1Text" inherits="GameFontNormal" hidden="false">
					<Size>
						<AbsDimension x="0" y="13"/>
					</Size>
					<Anchors>
						<Anchor point="TOP" relativeTo="DuelInspect_ItemQualityFrame" relativePoint="BOTTOM">
							<Offset>
								<AbsDimension x="0" y="-13"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>		
		<Scripts>
			<OnEnter>DuelInspect_ShowItemTooltip(useItemLink[1]);</OnEnter>
			<OnLeave>GameTooltip:Hide();</OnLeave>
		</Scripts>
	</Frame>
	<Frame name="DuelInspect_UseItem2Frame" parent="StaticPopup1" hidden="true">
		<Size>
			<AbsDimension x="175" y="13"/>
		</Size>
		<Anchors>
			<Anchor point="BOTTOM" relativeTo="DuelInspect_UseItem1Frame">
				<Offset>
					<AbsDimension x="0" y="-13"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="DIALOGUE">
				<FontString name="DuelInspect_UseItem2Text" inherits="GameFontNormal" hidden="false" justifyH="CENTER">
					<Size>
						<AbsDimension x="0" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="BOTTOM" relativeTo="DuelInspect_UseItem1Frame" relativePoint="BOTTOM">
							<Offset>
								<AbsDimension x="0" y="-13"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>		
		<Scripts>
			<OnEnter>DuelInspect_ShowItemTooltip(useItemLink[2]);</OnEnter>
			<OnLeave>GameTooltip:Hide();</OnLeave>
		</Scripts>
	</Frame>
	<Frame name="DuelInspect_UseItem3Frame" parent="StaticPopup1" hidden="true">
		<Size>
			<AbsDimension x="175" y="13"/>
		</Size>
		<Anchors>
			<Anchor point="BOTTOM" relativeTo="DuelInspect_UseItem2Frame">
				<Offset>
					<AbsDimension x="0" y="-13"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="DIALOGUE">
				<FontString name="DuelInspect_UseItem3Text" inherits="GameFontNormal" hidden="false" justifyH="CENTER">
					<Size>
						<AbsDimension x="0" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="BOTTOM" relativeTo="DuelInspect_UseItem2Frame" relativePoint="BOTTOM">
							<Offset>
								<AbsDimension x="0" y="-13"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>		
		<Scripts>
			<OnEnter>DuelInspect_ShowItemTooltip(useItemLink[3]);</OnEnter>
			<OnLeave>GameTooltip:Hide();</OnLeave>
		</Scripts>
	</Frame>
	<Frame name="DuelInspect_UseItem4Frame" parent="StaticPopup1" hidden="true">
		<Size>
			<AbsDimension x="175" y="13"/>
		</Size>
		<Anchors>
			<Anchor point="BOTTOM" relativeTo="DuelInspect_UseItem3Frame">
				<Offset>
					<AbsDimension x="0" y="-13"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="DIALOGUE">
				<FontString name="DuelInspect_UseItem4Text" inherits="GameFontNormal" hidden="false" justifyH="CENTER">
					<Size>
						<AbsDimension x="0" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="BOTTOM" relativeTo="DuelInspect_UseItem3Frame" relativePoint="BOTTOM">
							<Offset>
								<AbsDimension x="0" y="-13"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>		
		<Scripts>
			<OnEnter>DuelInspect_ShowItemTooltip(useItemLink[4]);</OnEnter>
			<OnLeave>GameTooltip:Hide();</OnLeave>
		</Scripts>
	</Frame>	







	<Button name="DuelInspect_TargetButton" parent="StaticPopup1" framestrata="DIALOGUE" hidden="true" inherits="UIPanelButtonTemplate" movable="false" text="$DI_TEXT_TARGET">
		<Size>
			<AbsDimension x="128" y="21"/>
		</Size>
		<Anchors>
			<Anchor point="LEFT" relativeTo="StaticPopup1Button1" relativePoint="BOTTOMRIGHT">
				<Offset>
					<AbsDimension x="-64" y="-13"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnClick>
				for index = 1, STATICPOPUP_NUMDIALOGS, 1 do
					local frame = getglobal("StaticPopup"..index);
					if ( frame:IsVisible() and (frame.which == "DUEL_REQUESTED" or frame.which == "DUEL_CHALLENGE") ) then

						oppFound = DuelInspect_TargetOpponent();
						
						if ( oppFound ) then
							DuelInspect_UpdateData(index,true);
							break;
						else
							UIErrorsFrame:AddMessage(ERR_UNIT_NOT_FOUND, 1.0, 0.0, 0.0, 1.0, UIERRORS_HOLD_TIME);
						end
						
					end
				end
			</OnClick>
		</Scripts>
	</Button>
	







  <Frame name="DuelInspectFrame" hidden="true">
    <Scripts>
      <OnLoad>
        DuelInspect_OnLoad();
      </OnLoad>
      <OnEvent>
        DuelInspect_OnEvent(event);
      </OnEvent>
      <OnUpdate>
				for index = 1, STATICPOPUP_NUMDIALOGS, 1 do
					local frame = getglobal("StaticPopup"..index);
					if ( frame:IsVisible() and (frame.which == "DUEL_REQUESTED" or frame.which == "DUEL_CHALLENGE") ) then
      			
      			DuelInspect_UpdateStaticPopupSize(index);
      			DuelInspect_PrepareFrames(index,false);
						
						local orig_text = getglobal("StaticPopup"..index.."Text"):GetText();
						local textpos = string.find(orig_text, " ");
						local name = string.sub(orig_text, 0, ( textpos - 1 ) );
						
						if ( frame.which == "DUEL_CHALLENGE" and UnitName("target") == name ) then
						
							if ( UnitAffectingCombat("target") ) then
							  getglobal("StaticPopup"..index.."Button1"):Disable();
							  getglobal("StaticPopup"..index.."Button1"):SetText(SPELL_FAILED_TARGET_AFFECTING_COMBAT);		
							elseif ( not CheckInteractDistance("target", 3) ) then
							  getglobal("StaticPopup"..index.."Button1"):Disable();
							  getglobal("StaticPopup"..index.."Button1"):SetText(strsub(ERR_OUT_OF_RANGE, 0, (strlen(ERR_OUT_OF_RANGE) - 1)));				  
							else
								getglobal("StaticPopup"..index.."Button1"):Enable();
							  getglobal("StaticPopup"..index.."Button1"):SetText(DUEL);
							end
							
						elseif ( frame.which == "DUEL_CHALLENGE" and UnitName("target") ~= name ) then
							getglobal("StaticPopup"..index.."Button1"):Disable();
						  getglobal("StaticPopup"..index.."Button1"):SetText(SPELL_FAILED_BAD_TARGETS);
						elseif ( frame.which == "DUEL_REQUESTED" ) then	
							getglobal("StaticPopup"..index.."Button1"):Enable();
						  getglobal("StaticPopup"..index.."Button1"):SetText(ACCEPT);
						end
	
      		end
      	end
      </OnUpdate>
    </Scripts>
  </Frame>	










	<Frame name="DuelInspect_OptionsFrame" toplevel="true" enableMouse="true" frameStrata="HIGH" hidden="true" alpha="0.60">
		<Size>
			<AbsDimension x="275" y="106"/>
		</Size>
		<Anchors>
			<Anchor point="TOP" relativeTo="StaticPopup1" relativePoint="TOP">
				<Offset>
					<AbsDimension x="0" y="90"/>
				</Offset>
			</Anchor>
		</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>
		<Frames>
			<CheckButton name="DuelInspect_OptionsFrame_CheckButton1" inherits="OptionsCheckButtonTemplate" hidden="true">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="14" y="-20"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
		        <FontString name="DuelInspect_OptionsFrame_CheckButton1Text" inherits="GameFontHighlightSmall" text="DI_TEXT_BUFFS">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						if ( this:GetChecked() ) then
							PlaySound("igMainMenuOptionCheckBoxOff");
							getglobal("DuelInspect_UnitBuffFrame"):Show();
							DI_SAVE.ShowBuffs = true;
						else
							PlaySound("igMainMenuOptionCheckBoxOn");
							getglobal("DuelInspect_UnitBuffFrame"):Hide();
							DI_SAVE.ShowBuffs = false;
						end
					</OnClick>	
					<OnLoad>
						this:SetChecked(DI_SAVE.ShowBuffs);
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="DuelInspect_OptionsFrame_CheckButton2" inherits="OptionsCheckButtonTemplate" hidden="true">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="-14" y="-20"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
		        <FontString name="DuelInspect_OptionsFrame_CheckButton2Text" inherits="GameFontHighlightSmall" text="DI_TEXT_RESISTANCES" justifyH="RIGHT">
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						if ( this:GetChecked() ) then
							PlaySound("igMainMenuOptionCheckBoxOff");
							getglobal("DuelInspect_ResistanceFrame"):Show();
							DI_SAVE.ShowResistances = true;
						else
							PlaySound("igMainMenuOptionCheckBoxOn");
							getglobal("DuelInspect_ResistanceFrame"):Hide();
							DI_SAVE.ShowResistances = false;
						end
					</OnClick>	
					<OnLoad>
						this:SetChecked(DI_SAVE.ShowResistances);
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="DuelInspect_OptionsFrame_CheckButton3" inherits="OptionsCheckButtonTemplate" hidden="true">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM" relativeTo="DuelInspect_OptionsFrame_CheckButton1">
						<Offset>
							<AbsDimension x="0" y="-16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
		        <FontString name="DuelInspect_OptionsFrame_CheckButton3Text" inherits="GameFontHighlightSmall" text="DI_TEXT_ITEMQUALITY">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						if ( this:GetChecked() ) then
							PlaySound("igMainMenuOptionCheckBoxOff");
							DI_SAVE.ShowItemsQuality = true;
							getglobal("DuelInspect_ItemQualityFrame"):Show();
						else
							PlaySound("igMainMenuOptionCheckBoxOn");
							DI_SAVE.ShowItemsQuality = false;
							getglobal("DuelInspect_ItemQualityFrame"):Hide();
						end
					</OnClick>	
					<OnLoad>
						this:SetChecked(DI_SAVE.ShowItemsQuality);
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="DuelInspect_OptionsFrame_CheckButton4" inherits="OptionsCheckButtonTemplate" hidden="true">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM" relativeTo="DuelInspect_OptionsFrame_CheckButton2">
						<Offset>
							<AbsDimension x="0" y="-16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
		        <FontString name="DuelInspect_OptionsFrame_CheckButton4Text" inherits="GameFontHighlightSmall" text="USABLE_ITEMS" justifyH="RIGHT">
							<Anchors>
								<Anchor point="RIGHT" relativePoint="LEFT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
					
						if ( this:GetChecked() ) then
							PlaySound("igMainMenuOptionCheckBoxOff");
							for cnt = 1, 4 do
								getglobal("DuelInspect_UseItem"..cnt.."Frame"):Show();
							end
							DI_SAVE.ShowUsableItems = true;
						else
							PlaySound("igMainMenuOptionCheckBoxOn");
							for cnt = 1, 4 do
								getglobal("DuelInspect_UseItem"..cnt.."Frame"):Hide();
							end
							DI_SAVE.ShowUsableItems = false;
						end
						
					</OnClick>	
					<OnLoad>
						this:SetChecked(DI_SAVE.ShowUsableItems);
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="DuelInspect_OptionsFrame_CheckButton5" inherits="OptionsCheckButtonTemplate" hidden="true">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOM" relativeTo="DuelInspect_OptionsFrame_CheckButton3">
						<Offset>
							<AbsDimension x="0" y="-16"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
		        <FontString name="DuelInspect_OptionsFrame_CheckButton5Text" inherits="GameFontHighlightSmall" text="DI_TEXT_UPGROUTBOUND">
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						if ( this:GetChecked() ) then
							PlaySound("igMainMenuOptionCheckBoxOff");
							DI_SAVE.OutboundDuels = true;
						else
							PlaySound("igMainMenuOptionCheckBoxOn");
							DI_SAVE.OutboundDuels = false;
						end
					</OnClick>	
					<OnLoad>
						this:SetChecked(DI_SAVE.OutboundDuels);
					</OnLoad>
				</Scripts>
			</CheckButton>
		</Frames>
		<Layers>
			<Layer level="ARTWORK">
        <Texture name="DuelInspect_OptionsFrame_HeaderTexture" file="Interface\DialogFrame\UI-DialogBox-Header">
					<Size>
						<AbsDimension x="180" y="45"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="5"/>
							</Offset>
						</Anchor>
					</Anchors>          
        </Texture>
				<FontString name="DuelInspect_OptionsFrame_HeaderText" inherits="GameFontNormal" text="Options">
					<Size>
						<AbsDimension x="80" y="0"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="-2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
      <OnUpdate>
				for index = 1, STATICPOPUP_NUMDIALOGS, 1 do
					local frame = getglobal("StaticPopup"..index);
					if ( frame:IsVisible() and (frame.which == "DUEL_REQUESTED" or frame.which == "DUEL_CHALLENGE") ) then
						DuelInspect_UpdateOptionsFrame(this,index);
						break;
      		end
      	end
			</OnUpdate>
		</Scripts>
	</Frame>







	<GameTooltip name="DuelInspect_Tooltip" frameStrata="TOOLTIP" hidden="true" parent="UIParent" inherits="GameTooltipTemplate"/>

</Ui>

