mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +00:00
tooltip: fix frame scaling for top anchor position
This commit is contained in:
+3
-2
@@ -28,12 +28,13 @@ pfUI:RegisterModule("tooltip", "vanilla:tbc", function ()
|
|||||||
if C.tooltip.cursoralign ~= "native" then
|
if C.tooltip.cursoralign ~= "native" then
|
||||||
-- create mouse follow frame
|
-- create mouse follow frame
|
||||||
if not tooltip.cursor then
|
if not tooltip.cursor then
|
||||||
tooltip.cursor = CreateFrame("Frame")
|
tooltip.cursor = CreateFrame("Frame", nil, UIParent)
|
||||||
tooltip.cursor:SetWidth(tonumber(C.tooltip.cursoroffset) * 2)
|
tooltip.cursor:SetWidth(tonumber(C.tooltip.cursoroffset) * 2)
|
||||||
tooltip.cursor:SetHeight(tonumber(C.tooltip.cursoroffset) * 2)
|
tooltip.cursor:SetHeight(tonumber(C.tooltip.cursoroffset) * 2)
|
||||||
tooltip.cursor:SetScript("OnUpdate", function()
|
tooltip.cursor:SetScript("OnUpdate", function()
|
||||||
|
local scale = UIParent:GetScale()
|
||||||
local x, y = GetCursorPosition()
|
local x, y = GetCursorPosition()
|
||||||
this:SetPoint("CENTER", UIParent, "BOTTOMLEFT", x, y)
|
this:SetPoint("CENTER", UIParent, "BOTTOMLEFT", x/scale, y/scale)
|
||||||
if C.tooltip.cursoralign == "top" then
|
if C.tooltip.cursoralign == "top" then
|
||||||
tooltip.cursor:SetWidth(tooltip:GetWidth())
|
tooltip.cursor:SetWidth(tooltip:GetWidth())
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user