User Interface Animation : What to use?

Hi,

I would like to create some animation for my user interface.
What tools are there? Which one are good to use.
Which one do u use?

I’m thinking about animating a transition from a menuscreen to a settings screen (and vice versa) where user interface components move on/off screen; & an animating background in my settings screen.

This completely depends on what you’re using to code the whole shebang. Is this libGDX? LWJGL? JOGL? Swing? AWT? Something else entirely? Is this on Android or on desktop? What have you tried so far?

I’m using Libgdx. Creating a game to be used on android devices

In game so far i have animated everything real simple using code by just looping a couple of textures.

For example: here i animate an enemy by changing its texture over time:

if (enemyType == 914) {//
			animationVariable += 1.2f;
			if (animationVariable < 10) {
				text = UPANDDOWNER1;
			} else if (animationVariable < 20) {
				text = UPANDDOWNER2;
			} else if (animationVariable < 30) {
				text = UPANDDOWNER3;
			} else if (animationVariable < 40) {
				text = UPANDDOWNER2;
			} else if (animationVariable >= 40)
				animationVariable = 0;

Now i want to animate a user interface & if I would animate my graphics the same way it just seems like its too much work and/or the above way just doesnt seem like the way to go:
like i want panels moving in/out the screen, with a background that animates while i adjust some setting…things like that

I was just wondering if there are some tools out there i could use

You know that libGDX has an Animation class, right?

Even without that, the nasty if-else ladder can be reduced to this: [icode]text = upAndDowners[((int) animationVariable) % 40 / 10];[/icode]

As for UI, you should be using Scene2d ui, so the no-brainer is Actions:


import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*;

actor.addAction(moveTo(x, y, duration));

// let's get fancy
actor.addAction(sequence(moveTo(200, 100, 2), color(Color.RED, 6), delay(0.5f), rotateTo(180, 5)));

Actions are super legit.

Tnx. Both recommendations look intereseting.
I just started implementing some scene2d stuff recently & hadn’t come across actions yet, but that definitely looks usefull