WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Wish List (https://www.wowinterface.com/forums/forumdisplay.php?f=15)
-   -   Feature request: animations (https://www.wowinterface.com/forums/showthread.php?t=48892)

Duugu 01-31-14 01:24 PM

Feature request: animations
 
This is a crosspost to http://www.wowinterface.com/forums/s...343#post290343


Currently a widget will be reset when an animation ends (to it's original position, angle, etc.).

An option/flag to retain the widgets position, angle, etc. at the end of an animation would be a great addition to the animation feature. For example to 'permanently' rotate a widget.

Thank you.

Choonstertwo 01-31-14 05:52 PM

This would quite a handy addition.

Resike 02-01-14 04:48 AM

You mean like animationGroup:SetLooping("REPEAT"), or i'm not sure what do you mean.

Phanx 02-01-14 07:26 AM

No, he means that if you do:
Code:

local frame = CreateFrame("Frame")
frame:SetAlpha(0)

local group = frame:CreateAnimationGroup()

local anim = group:CreateAnimation("ALPHA")
anim:SetChange(1)
anim:SetDuration(1)

group:Play()

... the frame will fade in from 0% to 100% opacity over 1 second, but at the end of the 1 second, it will drop back to the original 0% opacity. He wants an option for it to remain at the 100% opacity state, without having to add an OnFinished script that manually applies that value. For an alpha animation, that's obviously easy, but for an animation group that's moving and rotating whole frames, for example, the whole point of using the animation is so that you don't have to do all the math yourself to move and rotate the frame, so it's annoying to have to manually duplicate the final state of the animation in an OnFinished script.

Looping would not help here, as a loop would just make the frame fade in and out repeatedly, which is not the desired behavior.

Duugu 02-01-14 08:59 AM

Yes, that's exactly what I was asking for.

At the moment I'm doing it via ag:SetEndDelay() and then pausing the animation at onFinish (which is fired if the animation itself is done and before the delay starts).

But I wouldn't consider this as a good practice. It's rather a bad hack than 'using a feature'. :)
I introduces some unwanted problems too.

It's even worse with rotating than with fading or translating. Afaik the animation is the only way to rotate a frame (let's say an action button that represents a clickable area). The only other way to rotate something is SetTexCoord(), which applies to textures only.

Resike 02-01-14 09:54 AM

Quote:

Originally Posted by Phanx (Post 290366)
No, he means that if you do:
Code:

local frame = CreateFrame("Frame")
frame:SetAlpha(0)

local group = frame:CreateAnimationGroup()

local anim = group:CreateAnimation("ALPHA")
anim:SetChange(1)
anim:SetDuration(1)

group:Play()

... the frame will fade in from 0% to 100% opacity over 1 second, but at the end of the 1 second, it will drop back to the original 0% opacity. He wants an option for it to remain at the 100% opacity state, without having to add an OnFinished script that manually applies that value. For an alpha animation, that's obviously easy, but for an animation group that's moving and rotating whole frames, for example, the whole point of using the animation is so that you don't have to do all the math yourself to move and rotate the frame, so it's annoying to have to manually duplicate the final state of the animation in an OnFinished script.

Looping would not help here, as a loop would just make the frame fade in and out repeatedly, which is not the desired behavior.

I see, sadly animationgroups have so many issues with them, thats why so few developer uses it. They basically only created for the spell activation overlay effects, and it's even buggy there.

Resike 02-01-14 09:56 AM

Also you could add this to the list:

If you animate something with SetGradientAlpha added it drop it's colors during the animation.


All times are GMT -6. The time now is 04:56 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI