2022-08-19 08:54 AM
I have an on/off button animation which rotates 90 anti-clockwise on switch-off and rotates 90 clockwise on switch-on. The problem I have is that the Animation resets when I change screen and I don't always want this to happen?
2022-08-19 12:13 PM
Show your setup screen func, or place here setup state.
2022-08-22 02:03 AM
One way to solve this is to have two animations, an 'on' to 'off' and an 'off' to 'on' animation. Simply control the alpha values to the correct animation when a screen change occurs. I don't know if there's another way to do this with just one animation that would be neater?
::setupScreen()
state = presenter->getState();
if(state)
{
animation1.setAlpha(ON);
animation2.setAlpha(OFF);
}
else
{
animation1.setAlpha(OFF);
animation2.setAlpha(ON);
}
2022-08-23 11:40 AM
animatedImage widget can be set to reverse the direction of animation. You just need to remember the last direction that was set.
2022-08-24 01:00 AM
Thanks for your reply, I haven't tried that, but I will now. Thanks again. Will.