<Ui>

<!-- TAB TEMPLATE --> 
	<Button name="UnitButtonsTabTemplate" inherits="TabButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="145" y="25"/>
		</Size>
		<Scripts>
			<OnClick>
				PanelTemplates_Tab_OnClick(UBConfig)
				UB_ButtonHandler(this:GetName())
			</OnClick>
		</Scripts>
	</Button>

<!-- ROOT CONFIG FRAME --> 
	<Frame name="UBConfig" toplevel="true" parent="UIParent" frameStrata="HIGH" hidden="true" enableMouse="true" movable="true">
		<Size>
			<AbsDimension x="800" y="450"/>
		</Size>
		<Anchors>
			<Anchor point="BOTTOMRIGHT"/>
		</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="64"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="64"/>
			</EdgeSize>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<Texture 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>
			</Layer>
			<Layer level="OVERLAY">
				<FontString inherits="GameFontNormal" text="UnitButtons Config">
					<Anchors>
						<Anchor point="TOP" relativeTo="$parent"></Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentTab1" inherits="UnitButtonsTabTemplate" id="1" text="General">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="24" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("This configuration tab is used to enable bars and add/remove/assign/resize buttons", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
				</Scripts>
			</Button>
			<Button name="$parentTab2" inherits="UnitButtonsTabTemplate" id="2" text="Dynamic Buttons">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="100" y="-30"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("This configuration tab is used to assign button behavior based on target conditions", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
				</Scripts>
			</Button>
			<Button name="$parentButtonClose" inherits="OptionsButtonTemplate" text="Close">
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-24" y="24"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Click to close configuration window", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnClick>
						UBConfigUIStop()
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentButtonResetFrame" inherits="OptionsButtonTemplate" text="Reset Bars">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="24" y="24"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Clicking this will reset button frames to default locations", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnClick>
						UBResetFrames()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>						
		<Scripts>
			<OnShow>
				UBConfigUIStart()				
			</OnShow>
			<OnHide>
				UBVAR.DYNBTNMODE = nil
				UBVAR.UBCFGMODE = nil
			</OnHide>
      		<OnMouseDown>
         		self:StartMoving();
      		</OnMouseDown>
      		<OnMouseUp>
         		self:StopMovingOrSizing()
      		</OnMouseUp>
		</Scripts>
	</Frame>

<!-- MAIN CONFIG FRAME --> 
	<Frame name="UBConfigSub1" toplevel="true" parent="UBConfig" frameStrata="DIALOG" hidden="true" enableMouse="true" movable="true">
		<Size>
			<AbsDimension x="720" y="355"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Frames>

			<CheckButton name="$parentCheckButton1" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent">
					<Offset>
						<AbsDimension x="0" y="-20"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Show button bar labels, when hidden bars cannot be moved. \n \n*note* Bars are always visable  and moveable when in configuration mode.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("SHOW BAR LABELS");
					</OnLoad>
					<OnClick>
						UBConfigSub1CheckBox1_OnClick();
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCheckButton2" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1">
					<Offset>
						<AbsDimension x="200" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Enabling this will lock buttons to their bar slots and can no longer be moved", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("LOCK BUTTONS");
					</OnLoad>
					<OnClick>
						UBConfigSub1CheckBox2_OnClick();
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentCheckButton3" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCheckButton2">
					<Offset>
						<AbsDimension x="200" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("When enabled buttons will be layed out in two rows of six buttons, instead of one row of twelve buttons.\n\n*note*  The WOW UI will be reloaded.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("STACK BUTTONS (2 ROWS)");
					</OnLoad>
					<OnClick>
						UBConfigSub1CheckBox3_OnClick();
					</OnClick>
				</Scripts>
			</CheckButton>

			<Slider name="$parentSliderNUMPLBTNS" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the number of visable buttons on your player bar.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("PLAYER BUTTONS");
						getglobal(this:GetName().."High"):SetText("12");
						getglobal(this:GetName().."Low"):SetText("Off");
						this:SetMinMaxValues(0,12);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1NUMPLBTNS_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="NUMPLBTNSText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderPLSCALE" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSliderNUMPLBTNS">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the size of your player buttons.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("PLAYER SCALE");
						getglobal(this:GetName().."High"):SetText("1.5x");
						getglobal(this:GetName().."Low"):SetText(".2x");
						this:SetMinMaxValues(.2,1.5);
						this:SetValueStep(.05);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1PLSCALE_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="PLSCALEText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderNUMPLPBTNS" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSliderPLSCALE">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the number of visable buttons on your player pet bar.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("PLAYER PET BUTTONS");
						getglobal(this:GetName().."High"):SetText("12");
						getglobal(this:GetName().."Low"):SetText("Off");
						this:SetMinMaxValues(0,12);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1NUMPLPBTNS_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="NUMPLPBTNSText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderPLPSCALE" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSliderNUMPLPBTNS">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the size of your player pet buttons.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("PLAYER PET SCALE");
						getglobal(this:GetName().."High"):SetText("1.5x");
						getglobal(this:GetName().."Low"):SetText(".2x");
						this:SetMinMaxValues(.2,1.5);
						this:SetValueStep(.05);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1PLPSCALE_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="PLPSCALEText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderNUMTBTNS" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1">
						<Offset>
							<AbsDimension x="190" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the number of visable buttons on your target bar.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("TARGET BUTTONS");
						getglobal(this:GetName().."High"):SetText("12");
						getglobal(this:GetName().."Low"):SetText("Off");
						this:SetMinMaxValues(0,12);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1NUMTBTNS_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="NUMTBTNSText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderTSCALE" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSliderNUMTBTNS">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the size of your target buttons.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("TARGET SCALE");
						getglobal(this:GetName().."High"):SetText("1.5x");
						getglobal(this:GetName().."Low"):SetText(".2x");
						this:SetMinMaxValues(.2,1.5);
						this:SetValueStep(.05);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1TSCALE_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="TSCALEText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderNUMPABTNS" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1">
						<Offset>
							<AbsDimension x="380" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the number of visable buttons on your party member bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("PARTY BUTTONS");
						getglobal(this:GetName().."High"):SetText("12");
						getglobal(this:GetName().."Low"):SetText("Off");
						this:SetMinMaxValues(0,12);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1NUMPABTNS_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="NUMPABTNSText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderPASCALE" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSliderNUMPABTNS">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the size of your party member buttons.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("PARTY SCALE");
						getglobal(this:GetName().."High"):SetText("1.5x");
						getglobal(this:GetName().."Low"):SetText(".2x");
						this:SetMinMaxValues(.2,1.5);
						this:SetValueStep(.05);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1PASCALE_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="PASCALEText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderNUMPAPBTNS" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSliderPASCALE">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the number of visable buttons on your party member pet bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("PARTY PET BUTTONS");
						getglobal(this:GetName().."High"):SetText("12");
						getglobal(this:GetName().."Low"):SetText("Off");
						this:SetMinMaxValues(0,12);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1NUMPAPBTNS_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="NUMPAPBTNSText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderPAPSCALE" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSliderNUMPAPBTNS">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the size of your party member pet buttons.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("PARTY PET SCALE");
						getglobal(this:GetName().."High"):SetText("1.5x");
						getglobal(this:GetName().."Low"):SetText(".2x");
						this:SetMinMaxValues(.2,1.5);
						this:SetValueStep(.05);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1PAPSCALE_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="PAPSCALEText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderNUMRABTNS" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCheckButton1">
						<Offset>
							<AbsDimension x="570" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("RAID FUNCTIONALITY CURRENTLY DISABLED", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("RAID BUTTONS");
						getglobal(this:GetName().."High"):SetText("6");
						getglobal(this:GetName().."Low"):SetText("Off");
						this:SetMinMaxValues(0,6);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1NUMRABTNS_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="NUMRABTNSText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

			<Slider name="$parentSliderRASCALE" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSliderNUMRABTNS">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("RAID FUNCTIONALITY CURRENTLY DISABLED", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("RAID SCALE");
						getglobal(this:GetName().."High"):SetText(".5x");
						getglobal(this:GetName().."Low"):SetText(".2x");
						this:SetMinMaxValues(.2,.5);
						this:SetValueStep(.05);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub1RASCALE_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="RASCALEText" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>
		</Frames>
		<Scripts>
			<OnShow>
				UBVAR.UBCFGMODE = 1
				UBVAR.DYNBTNMODE = nil	
	 			UBConfigSub1_OnShow();
	 		</OnShow>
		</Scripts>
	</Frame>

<!-- DYNAMIC BUTTONS CONFIG FRAME --> 
	<Frame name="UBConfigSub2" toplevel="true" parent="UBConfig" frameStrata="DIALOG" hidden="true" enableMouse="true" movable="true">
		<Size>
			<AbsDimension x="675" y="355"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Frames>
			<CheckButton name="$parentBuff" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent">
					<Offset>
						<AbsDimension x="0" y="-20"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option tells UnitButtons to track when friendly units gain or lose this spell.\n\nWhen a units gains this spell the related buttons for their bar are hidden until the spell becomes inactive.\n\n*note* This behavior is modified by the next two options on the right.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Buff Friendly")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentBuffBlink" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentBuff">
					<Offset>
						<AbsDimension x="190" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option changes the default Buff behavior of the buttons assoicated with this spell. When not active on a unit the buttons blink instead of becoming fully visable.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Blink if not active")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentBuffDim" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentBuffBlink">
					<Offset>
						<AbsDimension x="190" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option changes the default Buff behavior of the buttons assoicated with this spell. When active on a unit buttons dim instead of becoming mostly invisable.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Dim when active")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentDebuff" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentBuff">
					<Offset>
						<AbsDimension x="0" y="-40"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option tells UnitButtons to track when unfriendly units gain or lose this spell.\n\nWhen a units gains this spell the related buttons for their bar are hidden until the spell becomes inactive.\n\n*note* This behavior is modified by the next two options on the right.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Debuff Enemy")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentDebuffBlink" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentDebuff">
					<Offset>
						<AbsDimension x="190" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option changes the default Debuff behavior of the buttons assoicated with this spell. When not active on a unit the buttons blink instead of becoming fully visable.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Blink if not active")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentDebuffDim" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentDebuffBlink">
					<Offset>
						<AbsDimension x="190" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option changes the default Debuff behavior of the buttons assoicated with this spell. When active on a unit buttons dim instead of becoming mostly invisable.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Dim when active")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentPoison" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentDebuff">
					<Offset>
						<AbsDimension x="0" y="-80"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option tells UnitButtons to track when friendly units are afflicted with Poison.\n\nSpells setup with this option will blink for units who are Poisoned until the Debuff is resolved.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Cure Poison")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentDisease" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPoison">
					<Offset>
						<AbsDimension x="127" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option tells UnitButtons to track when friendly units are afflicted with Disease.\n\nSpells setup with this option will blink for units who are Diseased until the Debuff is resolved.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Cure Disease ")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentCurse" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentDisease">
					<Offset>
						<AbsDimension x="127" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option tells UnitButtons to track when friendly units are afflicted with Curse.\n\nSpells setup with this option will blink for units who are Cursed until the Debuff is resolved.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Cure Curse")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentMagic" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCurse">
					<Offset>
						<AbsDimension x="127" y="0"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option tells UnitButtons to track when friendly units are afflicted with Magic.\n\nSpells setup with this option will blink for units who are Magicked until the Debuff is resolved.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Cure Magic")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>


			<CheckButton name="$parentWarrior" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parent">
					<Offset>
						<AbsDimension x="-80" y="-80"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Warrior bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Warrior")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>


			<CheckButton name="$parentPaladin" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentWarrior">
					<Offset>
						<AbsDimension x="0" y="30"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Paladin bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Paladin")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentDruid" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPaladin">
					<Offset>
						<AbsDimension x="0" y="30"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Druid bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Druid")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>


			<CheckButton name="$parentShaman" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentDruid">
					<Offset>
						<AbsDimension x="0" y="30"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Shaman bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Shaman")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>


			<CheckButton name="$parentHunter" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentShaman">
					<Offset>
						<AbsDimension x="0" y="30"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Hunter bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Hunter")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>


			<CheckButton name="$parentRogue" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHunter">
					<Offset>
						<AbsDimension x="0" y="30"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Rogue bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Rogue")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>


			<CheckButton name="$parentWarlock" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRogue">
					<Offset>
						<AbsDimension x="0" y="30"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Warlock bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Warlock")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>


			<CheckButton name="$parentMage" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentWarlock">
					<Offset>
						<AbsDimension x="0" y="30"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Mage bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Mage")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>


			<CheckButton name="$parentPriest" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentMage">
					<Offset>
						<AbsDimension x="0" y="30"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Select to hide this spell on Priest bars.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Disable for Priest")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>

			<CheckButton name="$parentHeal" inherits="OptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentPoison">
					<Offset>
						<AbsDimension x="0" y="-80"/>
					</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Selecting this option tells UnitButtons to assoicate this spell with friendly units health status.\n\nThis option enables the sliders below, these sliders allow you configure button behavior depending on how healthy the friendly units are.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2CheckBox_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Heal Friendly")
					</OnLoad>
					<OnClick>
						UBConfigSub2CheckBox_OnClick()
					</OnClick>
				</Scripts>
			</CheckButton>
			<Slider name="$parentHealBlink" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHeal">
						<Offset>
							<AbsDimension x="0" y="-50"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the slider to off or a value between 1 and 100.\n\nWhen a friendly units health drops below this value the assoicated buttons will blink until their health again exceeds this value.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2Slider_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Blink if HP drops below:");
						getglobal(this:GetName().."High"):SetText("100");
						getglobal(this:GetName().."Low"):SetText("Off"); 	
						this:SetMinMaxValues(0,100);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub2Slider_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentFontName" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>
			<Slider name="$parentHealDim" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHealBlink">
						<Offset>
							<AbsDimension x="190" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the slider to off or a value between 1 and 100.\n\nWhen a friendly units health is above this value the assoicated buttons will dim until their health again drops below this value.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2Slider_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Dim if HP is above:");
						getglobal(this:GetName().."High"):SetText("100");
						getglobal(this:GetName().."Low"):SetText("Off");
						this:SetMinMaxValues(0,100);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub2Slider_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentFontName" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>
			<Slider name="$parentHealHide" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="140" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHealDim">
						<Offset>
							<AbsDimension x="190" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText("Set the slider to off or a value between 1 and 100.\n\nWhile a friendly units health is at or above this value the assoicated buttons will be hidden until their health drops below this value.", nil, nil, nil, nil, 1)
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnShow>	
			 			UBConfigSub2Slider_OnShow()
			 		</OnShow>
					<OnLoad>
						getglobal(this:GetName().."Text"):SetText("Hide while HP is or above:");
						getglobal(this:GetName().."High"):SetText("100");
						getglobal(this:GetName().."Low"):SetText("Off");
						this:SetMinMaxValues(0,100);
						this:SetValueStep(1);
					</OnLoad>
					<OnValueChanged>
						UBConfigSub2Slider_OnClick();
					</OnValueChanged>
				</Scripts>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentFontName" inherits="GameFontNormal" text="">
							<Anchors>
								<Anchor point="RIGHT" relativeTo="$parent">
									<Offset>
										<AbsDimension x="20" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Slider>

		</Frames>
		<Scripts>
			<OnShow>
				UBVAR.UBCFGMODE = 1
				UBVAR.DYNBTNMODE = 1
				UB_InitSpell()
			</OnShow>
			<OnHide>
				UBVAR.DYNBTNMODE = nil
				UB_InitSpell()
			</OnHide>
		</Scripts>
	</Frame>

<!-- DYNAMIC BUTTONS CONFIG FRAME --> 
	<Frame name="UBConfigSub3" toplevel="true" parent="UBConfig" frameStrata="DIALOG" hidden="true" enableMouse="true" movable="true">
		<Size>
			<AbsDimension x="555" y="555"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="$parentFontName" inherits="GameFontHighlight" text="You are now in dynamic button configuration mode. ">
							<Anchors>
								<Anchor point="CENTER" relativeTo="$parent">
									<Offset>
										<AbsDimension x="0" y="130"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="$parentFontName" inherits="GameFontHighlight" text="Please left click the mouse on a UnitButton to begin assigning spell attributes.">
							<Anchors>
								<Anchor point="CENTER" relativeTo="$parent">
									<Offset>
										<AbsDimension x="0" y="100"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="$parentFontName" inherits="GameFontNormal" text="*NOTE1* Spells cannot be dragged or dropped while in Dynamic Mode ">
							<Anchors>
								<Anchor point="CENTER" relativeTo="$parent">
									<Offset>
										<AbsDimension x="0" y="-120"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
		<Frames>
			<Scripts>
				<OnShow>
					UBVAR.UBCFGMODE = 1
					UBVAR.DYNBTNMODE = nil
				</OnShow>
			</Scripts>
		</Frames>
	</Frame>
</Ui>
