Framework update

This commit is contained in:
Tercio Jose
2022-08-29 18:33:41 -03:00
parent ab2d87b27e
commit e092c4d0aa
6 changed files with 49 additions and 15 deletions
+15 -1
View File
@@ -1,6 +1,6 @@
local dversion = 331
local dversion = 332
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -722,6 +722,20 @@ function DF:SetFontShadow (fontString, r, g, b, a, x, y)
fontString:SetShadowOffset (x, y)
end
function DF:SetFontRotation(fontString, degrees)
if (type(degrees) == "number") then
if (not fontString.__rotationAnimation) then
fontString.__rotationAnimation = DF:CreateAnimationHub(fontString)
fontString.__rotationAnimation.rotator = DF:CreateAnimation(fontString.__rotationAnimation, "rotation", 1, 0, 0)
fontString.__rotationAnimation.rotator:SetEndDelay(math.huge)
fontString.__rotationAnimation.rotator:SetSmoothProgress(1)
end
fontString.__rotationAnimation.rotator:SetDegrees(degrees)
fontString.__rotationAnimation:Play()
fontString.__rotationAnimation:Pause()
end
end
function DF:AddClassColorToText (text, class)
if (type (class) ~= "string") then
return DF:RemoveRealName (text)