Quantcast Please fix the animation/rotation feature - WoWInterface
Thread Tools Display Modes
01-31-14, 01:23 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Please fix the animation/rotation feature

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
Code:
/script ag:Play()
to start the animation again.
Lua Code:
  1. local f = CreateFrame("Frame", nil, UIParent)
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. f:SetScript("OnEvent", function(...)
  4.  
  5.     local tFrame = CreateFrame("Frame", UIParent)
  6.     tFrame:SetPoint("CENTER", UIParent, "CENTER")
  7.     tFrame:SetHeight(100)
  8.     tFrame:SetWidth(100)
  9.     tFrame:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", edgeFile="",
  10.     tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
  11.    
  12.     local tFontstring = tFrame:CreateFontString("test", "OVERLAY")        
  13.     tFontstring:SetFontObject(GameFontNormalLarge)
  14.     tFontstring:SetText("test string")
  15.     tFontstring:SetPoint("CENTER", tFrame, "CENTER")
  16.  
  17.     ag = tFrame:CreateAnimationGroup()
  18.     local a1 = ag:CreateAnimation("Rotation")
  19.     a1:SetDuration(10)
  20.     a1:SetDegrees(90)
  21.     ag:Play()
  22.  
  23. 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:
  1. local f = CreateFrame("Frame", nil, UIParent)
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. f:SetScript("OnEvent", function(...)
  4.  
  5.     local tFrame = CreateFrame("Frame", UIParent)
  6.     tFrame:SetPoint("CENTER", UIParent, "CENTER")
  7.     tFrame:SetHeight(100)
  8.     tFrame:SetWidth(100)
  9.     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 }})
  10.  
  11.     local ag = tFrame:CreateAnimationGroup()
  12.     local a1 = ag:CreateAnimation("Rotation")
  13.     a1:SetDuration(50)
  14.     a1:SetDegrees(90)
  15.     ag:Play()
  16.  
  17. end)

The rotation of all child widgets not anchored to CENTER/CENTER is inaccurate.

Prove of concept:
Lua Code:
  1. local f = CreateFrame("Frame", nil, UIParent)
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. f:SetScript("OnEvent", function(...)
  4.  
  5.     local tFrame = CreateFrame("Frame", UIParent)
  6.     tFrame:SetPoint("CENTER", UIParent, "CENTER")
  7.     tFrame:SetHeight(100)
  8.     tFrame:SetWidth(100)
  9.     tFrame:SetBackdrop({bgFile="Interface\\Tooltips\\UI-Tooltip-Background", edgeFile="",
  10.     tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
  11.    
  12.     -- this frame is rotated correctly
  13.     tChildFrameCENTER = CreateFrame("Frame", tFrame)
  14.     tChildFrameCENTER:SetParent(tFrame)
  15.     tChildFrameCENTER:SetPoint("CENTER", tFrame, "CENTER")
  16.     tChildFrameCENTER:SetHeight(50)
  17.     tChildFrameCENTER:SetWidth(50)
  18.     tChildFrameCENTER:SetBackdrop({bgFile="Interface\\icons\\ability_ambush", edgeFile="",
  19.     tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
  20.  
  21.     -- this frame is NOT rotated correctly
  22.     tChildFrameTOPLEFT = CreateFrame("Frame", tFrame)
  23.     tChildFrameTOPLEFT:SetParent(tFrame)
  24.     tChildFrameTOPLEFT:SetPoint("TOPLEFT", tFrame, "TOPLEFT")
  25.     tChildFrameTOPLEFT:SetHeight(50)
  26.     tChildFrameTOPLEFT:SetWidth(50)
  27.     tChildFrameTOPLEFT:SetBackdrop({bgFile="Interface\\icons\\ability_animusdraw", edgeFile="",
  28.     tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
  29.  
  30.     local ag = tFrame:CreateAnimationGroup()
  31.     local a1 = ag:CreateAnimation("Rotation")
  32.     a1:SetDuration(50)
  33.     a1:SetDegrees(90)
  34.     ag:Play()
  35.  
  36. 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:
  1. local f = CreateFrame("Frame", nil, UIParent)
  2. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. f:SetScript("OnEvent", function(...)
  4.  
  5.     tCooldownFrame= CreateFrame("Cooldown", UIParent)
  6.     tCooldownFrame:SetParent(UIParent)
  7.     tCooldownFrame:SetPoint("CENTER", UIParent, "CENTER")
  8.     tCooldownFrame:SetHeight(50)
  9.     tCooldownFrame:SetWidth(50)
  10.     tCooldownFrame:SetBackdrop({bgFile="Interface\\Icons\\ability_ambush", edgeFile="",
  11.     tile = false, tileSize = 1, edgeSize = 10, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
  12.  
  13.     ag = tCooldownFrame:CreateAnimationGroup()
  14.     local a1 = ag:CreateAnimation("Rotation")
  15.     a1:SetDuration(50)
  16.     a1:SetDegrees(90)
  17.  
  18. end)
  Reply With Quote

WoWInterface » Developer Discussions » Wish List » Please fix the animation/rotation feature

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off