Reply
 
Thread Tools Display Modes
Old 01-13-14, 12:33 PM   #1
Duugu
Premium Member
 
Duugu's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 563
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?
Duugu is offline   Reply With Quote
Old 01-13-14, 01:17 PM   #2
semlar
A Firelord
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 456
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.
semlar is offline   Reply With Quote
Old 01-13-14, 01:30 PM   #3
Duugu
Premium Member
 
Duugu's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 563
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.
Duugu is offline   Reply With Quote
Old 01-13-14, 01:38 PM   #4
semlar
A Firelord
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 456
Yeah I've found these sorts of things to require a bit of trial and error..
semlar is offline   Reply With Quote
Old 01-13-14, 02:20 PM   #5
Duugu
Premium Member
 
Duugu's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 563
oO

What is it?
Duugu is offline   Reply With Quote
Old 01-13-14, 02:29 PM   #6
semlar
A Firelord
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 456
It was part of a map project.


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

Go BackWoWInterface » 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