<Ui xmlns="http://www.blizzard.com/wow/ui" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Frame name="NecrosisGraphOptionMenu" hidden="true" parent="NecrosisGeneralFrame" movable="false" frameStrata="DIALOG" enableMouse="true">
		<Size>
			<AbsDimension x="350" y="452" />
		</Size>
		<Anchors>
			<Anchor point="BOTTOMLEFT" relativeTo="NecrosisGeneralFrame" />
		</Anchors>
		<HitRectInsets>
			<AbsInset left="0" right="35" top="0" bottom="75" />
		</HitRectInsets>
		<Layers>
			<Layer>
				<FontString name="NecrosisShowTrance_Option" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
							<Offset>
								<AbsDimension x="60" y="-40" />
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString name="NecrosisIconsLock_Option" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
							<Offset>
								<AbsDimension x="60" y="-80" />
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString name="NecrosisLock_Option" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
							<Offset>
								<AbsDimension x="60" y="-100" />
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString name="NecrosisBuffMenu_Option" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
							<Offset>
								<AbsDimension x="60" y="-140" />
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString name="NecrosisPetMenu_Option" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
							<Offset>
								<AbsDimension x="60" y="-160" />
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString name="NecrosisCurseMenu_Option" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
							<Offset>
								<AbsDimension x="60" y="-180" />
							</Offset>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Slider name="NecrosisButtonRotate_Slider" inherits="OptionsSliderTemplate" virtual="true" minValue="0" maxValue="360" valueStep="18">
				<Size>
					<AbsDimension x="150" y="16" />
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
						GameTooltip:SetText(this:GetValue())
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnValueChanged>
						NecrosisConfig.NecrosisAngle = this:GetValue()
						local x, y = NecrosisButton:GetCenter()
						GameTooltip:SetText(this:GetValue())
						Necrosis_ButtonSetup()
					</OnValueChanged>
				</Scripts>
			</Slider>
			<Slider name="NecrosisButtonScale_Slider" inherits="OptionsSliderTemplate" virtual="true" minValue="50" maxValue="150" valueStep="5">
				<Size>
					<AbsDimension x="150" y="16" />
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="0" y="-40" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						NBx, NBy = NecrosisButton:GetCenter()
						NBx = NBx * (NecrosisConfig.NecrosisButtonScale / 100)
						NBy = NBy * (NecrosisConfig.NecrosisButtonScale / 100)
						GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
						GameTooltip:SetText(this:GetValue().." %")
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide()
					</OnLeave>
					<OnValueChanged>
						if this:GetValue() ~= NecrosisConfig.NecrosisButtonScale then
							NecrosisButton:ClearAllPoints()
							GameTooltip:SetText(this:GetValue().." %")
							NecrosisConfig.NecrosisButtonScale = this:GetValue()
							NecrosisButton:SetPoint("CENTER", "UIParent", "BOTTOMLEFT", NBx / (NecrosisConfig.NecrosisButtonScale / 100), NBy / (NecrosisConfig.NecrosisButtonScale / 100))
							NecrosisButton:SetScale(NecrosisConfig.NecrosisButtonScale / 100)
							Necrosis_ButtonSetup()
						end
					</OnValueChanged>
				</Scripts>
			</Slider>
			<Slider name="ShadowTranceScale_Slider" inherits="OptionsSliderTemplate" virtual="true" minValue="50" maxValue="150" valueStep="5">
				<Size>
					<AbsDimension x="150" y="16" />
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="0" y="-80" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						STx, STy = NecrosisShadowTranceButton:GetCenter()
						STx = STx * (NecrosisConfig.ShadowTranceScale / 100)
						STy = STy * (NecrosisConfig.ShadowTranceScale / 100)

						BLx, BLy = NecrosisBacklashButton:GetCenter()
						BLx = BLx * (NecrosisConfig.ShadowTranceScale / 100)
						BLy = BLy * (NecrosisConfig.ShadowTranceScale / 100)

						AFx, AFy = NecrosisAntiFearButton:GetCenter()
						AFx = AFx * (NecrosisConfig.ShadowTranceScale / 100)
						AFy = AFy * (NecrosisConfig.ShadowTranceScale / 100)

						CAx, CAy = NecrosisCreatureAlertButton:GetCenter()
						CAx = CAx * (NecrosisConfig.ShadowTranceScale / 100)
						CAy = CAy * (NecrosisConfig.ShadowTranceScale / 100)

						ShowUIPanel(NecrosisShadowTranceButton)
						ShowUIPanel(NecrosisBacklashButton)
						ShowUIPanel(NecrosisAntiFearButton)
						ShowUIPanel(NecrosisCreatureAlertButton)
						GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
						GameTooltip:SetText(this:GetValue().."%")
					</OnEnter>
					<OnLeave>
						if not NecrosisShowTrance_Button:GetChecked() then
							HideUIPanel(NecrosisShadowTranceButton)
							HideUIPanel(NecrosisBacklashButton)
							HideUIPanel(NecrosisAntiFearButton)
							HideUIPanel(NecrosisCreatureAlertButton)
						end
						GameTooltip:Hide()
					</OnLeave>
					<OnValueChanged>
						if this:GetValue() ~= NecrosisConfig.ShadowTranceScale then
							GameTooltip:SetText(this:GetValue().."%")
							NecrosisConfig.ShadowTranceScale = this:GetValue()

							NecrosisShadowTranceButton:ClearAllPoints()
							NecrosisShadowTranceButton:SetPoint("CENTER", "UIParent", "BOTTOMLEFT", STx / (NecrosisConfig.ShadowTranceScale / 100), STy / (NecrosisConfig.ShadowTranceScale / 100))
							NecrosisShadowTranceButton:SetScale(NecrosisConfig.ShadowTranceScale / 100)

							NecrosisBacklashButton:ClearAllPoints()
							NecrosisBacklashButton:SetPoint("CENTER", "UIParent", "BOTTOMLEFT", BLx / (NecrosisConfig.ShadowTranceScale / 100), BLy / (NecrosisConfig.ShadowTranceScale / 100))
							NecrosisBacklashButton:SetScale(NecrosisConfig.ShadowTranceScale / 100)

							NecrosisCreatureAlertButton:ClearAllPoints()
							NecrosisCreatureAlertButton:SetPoint("CENTER", "UIParent", "BOTTOMLEFT", CAx / (NecrosisConfig.ShadowTranceScale / 100), CAy / (NecrosisConfig.ShadowTranceScale / 100))
							NecrosisCreatureAlertButton:SetScale(NecrosisConfig.ShadowTranceScale / 100)

							NecrosisAntiFearButton:ClearAllPoints()
							NecrosisAntiFearButton:SetPoint("CENTER", "UIParent", "BOTTOMLEFT", AFx / (NecrosisConfig.ShadowTranceScale / 100), AFy / (NecrosisConfig.ShadowTranceScale / 100))
							NecrosisAntiFearButton:SetScale(NecrosisConfig.ShadowTranceScale / 100)
						end
					</OnValueChanged>
				</Scripts>
			</Slider>
			<CheckButton name="NecrosisShowTrance_Button" inherits="UICheckButtonTemplate" enableMouse="true">
				<Size>
					<AbsDimension x="24" y="24" />
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="30" y="-35" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							ShowUIPanel(NecrosisShadowTranceButton)
							ShowUIPanel(NecrosisBacklashButton)
							ShowUIPanel(NecrosisAntiFearButton)
							ShowUIPanel(NecrosisCreatureAlertButton)
							NecrosisShadowTranceButton:RegisterForDrag("LeftButton")
							NecrosisBacklashButton:RegisterForDrag("LeftButton")
							NecrosisAntiFearButton:RegisterForDrag("LeftButton")
							NecrosisCreatureAlertButton:RegisterForDrag("LeftButton")
						else
							HideUIPanel(NecrosisShadowTranceButton)
							HideUIPanel(NecrosisBacklashButton)
							HideUIPanel(NecrosisAntiFearButton)
							HideUIPanel(NecrosisCreatureAlertButton)
							NecrosisShadowTranceButton:RegisterForDrag("")
							NecrosisBacklashButton:RegisterForDrag("")
							NecrosisAntiFearButton:RegisterForDrag("")
							NecrosisCreatureAlertButton:RegisterForDrag("")
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="NecrosisIconsLock_Button" inherits="UICheckButtonTemplate" enableMouse="true">
				<Size>
					<AbsDimension x="24" y="24" />
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="30" y="-75" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							NecrosisConfig.NecrosisLockServ = true
							Necrosis_ClearAllPoints()
							Necrosis_ButtonSetup()
							Necrosis_NoDrag()
							if not NecrosisConfig.NoDragAll then
								NecrosisButton:RegisterForDrag("LeftButton")
								NecrosisSpellTimerButton:RegisterForDrag("LeftButton")
							end
						else
							NecrosisConfig.NecrosisLockServ = false
							Necrosis_ClearAllPoints()
							local _G = getfenv(0)
							if _G["NecrosisFirestoneButton"] then
								NecrosisFirestoneButton:SetPoint("CENTER", "UIParent", "CENTER", -121,-100)
							end
							if _G["NecrosisSpellstoneButton"] then
								NecrosisSpellstoneButton:SetPoint("CENTER", "UIParent", "CENTER", -87,-100)
							end
							if _G["NecrosisHealthstoneButton"] then
								NecrosisHealthstoneButton:SetPoint("CENTER", "UIParent", "CENTER", -53,-100)
							end
							if _G["NecrosisSoulstoneButton"] then
								NecrosisSoulstoneButton:SetPoint("CENTER", "UIParent", "CENTER", -17,-100)
							end
							if _G["NecrosisBuffMenuButton"] then
								NecrosisBuffMenuButton:SetPoint("CENTER", "UIParent", "CENTER", 17,-100)
							end
							if _G["NecrosisMountButton"] then
								NecrosisMountButton:SetPoint("CENTER", "UIParent", "CENTER", 53,-100)
							end
							if _G["NecrosisPetMenuButton"] then
								NecrosisPetMenuButton:SetPoint("CENTER", "UIParent", "CENTER", 87,-100)
							end
							if _G["NecrosisPetMenuButton"] then
								NecrosisCurseMenuButton:SetPoint("CENTER", "UIParent", "CENTER", 121,-100)
							end
							Necrosis_Drag()
							NecrosisConfig.NoDragAll = false
							NecrosisLock_Button:SetChecked(false)
							NecrosisButton:RegisterForDrag("LeftButton")
							NecrosisSpellTimerButton:RegisterForDrag("LeftButton")
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="NecrosisLock_Button" inherits="UICheckButtonTemplate" enableMouse="true">
				<Size>
					<AbsDimension x="24" y="24" />
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="30" y="-95" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							Necrosis_NoDrag()
							NecrosisButton:RegisterForDrag("")
							NecrosisSpellTimerButton:RegisterForDrag("")
							NecrosisConfig.NoDragAll = true
						else
							if not NecrosisConfig.NecrosisLockServ then
								Necrosis_Drag()
							end
							NecrosisButton:RegisterForDrag("LeftButton")
							NecrosisSpellTimerButton:RegisterForDrag("LeftButton")
							NecrosisConfig.NoDragAll = false
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="NecrosisBuffMenu_Button" inherits="UICheckButtonTemplate" enableMouse="true">
				<Size>
					<AbsDimension x="24" y="24" />
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="30" y="-135" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							NecrosisConfig.BuffMenuPos.x = - math.abs(NecrosisConfig.BuffMenuPos.x)
							NecrosisConfig.BuffMenuPos.y = - math.abs(NecrosisConfig.BuffMenuPos.y)
						else
							NecrosisConfig.BuffMenuPos.x = math.abs(NecrosisConfig.BuffMenuPos.x)
							NecrosisConfig.BuffMenuPos.y = math.abs(NecrosisConfig.BuffMenuPos.y)
						end
						Necrosis_CreateMenu()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="NecrosisPetMenu_Button" inherits="UICheckButtonTemplate" enableMouse="true">
				<Size>
					<AbsDimension x="24" y="24" />
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="30" y="-155" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							NecrosisConfig.PetMenuPos.x = - math.abs(NecrosisConfig.PetMenuPos.x)
							NecrosisConfig.PetMenuPos.y = - math.abs(NecrosisConfig.PetMenuPos.y)
						else
							NecrosisConfig.PetMenuPos.x = math.abs(NecrosisConfig.PetMenuPos.x)
							NecrosisConfig.PetMenuPos.y = math.abs(NecrosisConfig.PetMenuPos.y)
						end
						Necrosis_CreateMenu()
					</OnClick>
				</Scripts>
			</CheckButton>
			<CheckButton name="NecrosisCurseMenu_Button" inherits="UICheckButtonTemplate" enableMouse="true">
				<Size>
					<AbsDimension x="24" y="24" />
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="NecrosisGraphOptionMenu">
						<Offset>
							<AbsDimension x="30" y="-175" />
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						if (this:GetChecked()) then
							NecrosisConfig.CurseMenuPos.x = - math.abs(NecrosisConfig.CurseMenuPos.x)
							NecrosisConfig.CurseMenuPos.y = - math.abs(NecrosisConfig.CurseMenuPos.y)
						else
							NecrosisConfig.CurseMenuPos.x = math.abs(NecrosisConfig.CurseMenuPos.x)
							NecrosisConfig.CurseMenuPos.y = math.abs(NecrosisConfig.CurseMenuPos.y)
						end
						Necrosis_CreateMenu()
					</OnClick>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>
</Ui>
