mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 06:00:00 +00:00
performance updates
performance updates
This commit is contained in:
@@ -33,6 +33,10 @@ pfUI:RegisterModule("tooltip", "vanilla:tbc", function ()
|
||||
tooltip.cursor:SetWidth(tonumber(C.tooltip.cursoroffset) * 2)
|
||||
tooltip.cursor:SetHeight(tonumber(C.tooltip.cursoroffset) * 2)
|
||||
tooltip.cursor:SetScript("OnUpdate", function()
|
||||
-- throttle to 0.1s - cursor following doesn't need to be every frame
|
||||
if (this.tick or 0) > GetTime() then return end
|
||||
this.tick = GetTime() + 0.1
|
||||
|
||||
local scale = UIParent:GetScale()
|
||||
local x, y = GetCursorPosition()
|
||||
this:SetPoint("CENTER", UIParent, "BOTTOMLEFT", x/scale, y/scale)
|
||||
|
||||
Reference in New Issue
Block a user