This is a crosspost to
http://www.wowinterface.com/forums/s...343#post290343
1. Rotating fontstring objects
The rotation of fontstring objects is inaccurate.
The first start of a fontstring animation works as expected. The second (and all further starts) don't behave as expected. The fontstring objects position starts at the point where the previous animation has ended.
This is also true for any fontstring objects that are childs of an animated widget.
Prove of concept:
Load the following code. Wait for the animation to finish. Then use
to start the animation again.
Lua Code:
local f = CreateFrame("Frame", nil, UIParent)
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function(...)
local tFrame = CreateFrame("Frame", UIParent)
tFrame:SetPoint("CENTER", UIParent, "CENTER")
tFrame:SetHeight(100)
tFrame:SetWidth(100)
tFrame:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", edgeFile="",
tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
local tFontstring = tFrame:CreateFontString("test", "OVERLAY")
tFontstring:SetFontObject(GameFontNormalLarge)
tFontstring:SetText("test string")
tFontstring:SetPoint("CENTER", tFrame, "CENTER")
ag = tFrame:CreateAnimationGroup()
local a1 = ag:CreateAnimation("Rotation")
a1:SetDuration(10)
a1:SetDegrees(90)
ag:Play()
end)
2. Rotating frame objects and everything that inherits from frame
The rotation of the backdrop border texture is inaccurate.
Prove of concept:
Lua Code:
local f = CreateFrame("Frame", nil, UIParent)
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function(...)
local tFrame = CreateFrame("Frame", UIParent)
tFrame:SetPoint("CENTER", UIParent, "CENTER")
tFrame:SetHeight(100)
tFrame:SetWidth(100)
tFrame:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", edgeFile="Interface\\Tooltips\\UI-Tooltip-Border", tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
local ag = tFrame:CreateAnimationGroup()
local a1 = ag:CreateAnimation("Rotation")
a1:SetDuration(50)
a1:SetDegrees(90)
ag:Play()
end)
The rotation of all child widgets not anchored to CENTER/CENTER is inaccurate.
Prove of concept:
Lua Code:
local f = CreateFrame("Frame", nil, UIParent)
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function(...)
local tFrame = CreateFrame("Frame", UIParent)
tFrame:SetPoint("CENTER", UIParent, "CENTER")
tFrame:SetHeight(100)
tFrame:SetWidth(100)
tFrame:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", edgeFile="",
tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
-- this frame is rotated correctly
tChildFrameCENTER = CreateFrame("Frame", tFrame)
tChildFrameCENTER:SetParent(tFrame)
tChildFrameCENTER:SetPoint("CENTER", tFrame, "CENTER")
tChildFrameCENTER:SetHeight(50)
tChildFrameCENTER:SetWidth(50)
tChildFrameCENTER:SetBackdrop({bgFile="Interface\\icons\\ability_ambush", edgeFile="",
tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
-- this frame is NOT rotated correctly
tChildFrameTOPLEFT = CreateFrame("Frame", tFrame)
tChildFrameTOPLEFT:SetParent(tFrame)
tChildFrameTOPLEFT:SetPoint("TOPLEFT", tFrame, "TOPLEFT")
tChildFrameTOPLEFT:SetHeight(50)
tChildFrameTOPLEFT:SetWidth(50)
tChildFrameTOPLEFT:SetBackdrop({bgFile="Interface\\icons\\ability_animusdraw", edgeFile="",
tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
local ag = tFrame:CreateAnimationGroup()
local a1 = ag:CreateAnimation("Rotation")
a1:SetDuration(50)
a1:SetDegrees(90)
ag:Play()
end)
3. Rotating Cooldown widgets
With a cooldown widget the frame itself is rotated (as inaccurate as every other widget type). But the 'somehow magically rendered' cooldown within the frame is not rotated.
Prove of concept:
Load the following code. Then use
Code:
/script tCooldownFrame:SetCooldown(GetTime(), 30); ag:Play()
to start the cooldown and the animation.
Lua Code:
local f = CreateFrame("Frame", nil, UIParent)
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function(...)
tCooldownFrame= CreateFrame("Cooldown", UIParent)
tCooldownFrame:SetParent(UIParent)
tCooldownFrame:SetPoint("CENTER", UIParent, "CENTER")
tCooldownFrame:SetHeight(50)
tCooldownFrame:SetWidth(50)
tCooldownFrame:SetBackdrop({bgFile="Interface\\Icons\\ability_ambush", edgeFile="",
tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
ag = tCooldownFrame:CreateAnimationGroup()
local a1 = ag:CreateAnimation("Rotation")
a1:SetDuration(50)
a1:SetDegrees(90)
end)