Thread Tools Display Modes
01-13-14, 01:33 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Is the animation group/animation feature with fontstring objects broken or something?

I'm currently working on an action bar mod and I'm creating action buttons via Blizzards ActionBarButtonTemplate template. Works as expected. I'm not doing any modification to ActionBarButtonTemplate. Is't the pure Blizzard template.

If I create an animation group/animation (rotation) on a frame that was created via ActionBarButtonTemplate then the frame itself is rotated as expected. But the fontstring object, that is part of the ActionBarButtonTemplate template, is not being rotated as expected.

My code is like:
Code:
local tFrame = CreateFrame("CheckButton", nil, UIparent, "ActionBarButtonTemplate")
local ag = tFrame:CreateAnimationGroup()
local a1 = ag:CreateAnimation("Rotation")
a1:SetDegrees(90)
a1:SetDuration(10)
ag:Play()
The result is like this:


Compare the the Blizzard action bar buttons on the bottom and the rotated ones in my bar. The frame, the texture ... everything is ok in my bar. Except the fontstring showing the stack size. It is ... somewhere and somehow weird rotated.

Has someone an idea why this could happen or if animation groups with fontstrings are working at all?
  Reply With Quote
01-13-14, 02:17 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
In my experience with animations, while the children of an object are rotated, their anchors are not and must be manually repositioned.

It's hard to tell if that's the cause here because the text appears to be at odd angles, but it could just be from being anchored by something other than their centers.
  Reply With Quote
01-13-14, 02:30 PM   #3
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by semlar View Post
In my experience with animations, while the children of an object are rotated, their anchors are not and must be manually repositioned.

It's hard to tell if that's the cause here because the text appears to be at odd angles, but it could just be from being anchored by something other than their centers.
That's it! They anchored them to BOTTOMRIGHT. Reanchoring the object to CENTER fixed it. So simple.

Thank you so much.
  Reply With Quote
01-13-14, 02:38 PM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Yeah I've found these sorts of things to require a bit of trial and error..
  Reply With Quote
01-13-14, 03:20 PM   #5
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
oO

What is it?
  Reply With Quote
01-13-14, 03:29 PM   #6
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
It was part of a map project.


Don't try to rotate a scrollframe.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Is the animation group/animation feature with fontstring objects broken or something?

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