unlock: cache zoom onupdate function

This commit is contained in:
shagu
2019-04-22 13:26:43 +02:00
parent a236cc9b6e
commit 6c6aaacd83
2 changed files with 11 additions and 12 deletions
+10 -8
View File
@@ -114,6 +114,15 @@ pfUI:RegisterModule("unlock", 20400, function ()
return frames
end
local function DraggerOnUpdate()
this.text:SetAlpha(this.text:GetAlpha() -0.05)
if this.text:GetAlpha() < 0.1 then
this.text:SetText(strsub(this:GetParent():GetName(),3))
this.text:SetAlpha(1)
this:SetScript("OnUpdate", function() return end)
end
end
local function SaveScale(frame, scale)
frame:SetScale(scale)
@@ -125,14 +134,7 @@ pfUI:RegisterModule("unlock", 20400, function ()
frame.drag.text:SetText(T["Scale"] .. ": " .. scale)
frame.drag.text:SetAlpha(1)
frame.drag:SetScript("OnUpdate", function()
this.text:SetAlpha(this.text:GetAlpha() -0.05)
if this.text:GetAlpha() < 0.1 then
this.text:SetText(strsub(this:GetParent():GetName(),3))
this.text:SetAlpha(1)
this:SetScript("OnUpdate", function() return end)
end
end)
frame.drag:SetScript("OnUpdate", DraggerOnUpdate)
end
local function SavePosition(frame)