Fixed an error when manually selection the tooltip anchor position

This commit is contained in:
Tercio Jose
2024-05-08 13:42:44 -03:00
parent 042322a4cf
commit 5aa9929ff3
2 changed files with 17 additions and 8 deletions
+6 -6
View File
@@ -3327,8 +3327,7 @@ do
tooltip_anchor:SetBackdropColor(0, 0, 0, 1)
tooltip_anchor:SetScript("OnEnter", function(self)
tooltip_anchor.alert.animIn:Stop()
tooltip_anchor.alert.animOut:Play()
tooltip_anchor.glowAnimation:Stop()
GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT")
GameTooltip:ClearLines()
GameTooltip:AddLine(Loc["STRING_OPTIONS_TOOLTIPS_ANCHOR_TEXT_DESC"])
@@ -3370,16 +3369,14 @@ do
self:SetMovable(true)
self:SetFrameStrata("FULLSCREEN")
self.locked = false
tooltip_anchor.alert.animOut:Stop()
tooltip_anchor.alert.animIn:Play()
tooltip_anchor.glowAnimation:Play()
else
self:SetAlpha(0)
self:EnableMouse(false)
self:SetFrameStrata("MEDIUM")
self:SetMovable(false)
self.locked = true
tooltip_anchor.alert.animIn:Stop()
tooltip_anchor.alert.animOut:Play()
tooltip_anchor.glowAnimation:Stop()
end
end
@@ -3400,6 +3397,9 @@ do
tooltip_anchor.alert:SetPoint("topleft", tooltip_anchor, "topleft", -60, 6)
tooltip_anchor.alert:SetPoint("bottomright", tooltip_anchor, "bottomright", 40, -6)
local glowAnimation = gump:CreateGlowOverlay(tooltip_anchor, "yellow", "white")
tooltip_anchor.glowAnimation = glowAnimation
local icon = tooltip_anchor:CreateTexture(nil, "overlay")
icon:SetTexture([[Interface\AddOns\Details\images\minimap]])
icon:SetPoint("left", tooltip_anchor, "left", 4, 0)