Home

Awesome

What is libgdx-screenmanager?

Release Build GWT Compatible Discord Support

This library is a screen manager for libGDX games. It allows comfortably changing the rendered screen while using transition effects. The library's easy to use nature makes it possible to integrate libgdx-screenmanager into any project without much effort.

Features

A small example using different transitions. Look at the showcases folder for more gifs.

Example code

The following example shows how to use libgdx-screenmanager in your code. You can find the full example here.

The library is very easy to use: The game has to extend ManagedGame, all screens have to inherit from ManagedScreen. To push a screen, game.getScreenManager().pushScreen(screen, transition) has to be called. If no transition should be used, just call pushScreen(screen, null).

public class MyGdxGame extends ManagedGame<ManagedScreen, ScreenTransition> {

	@Override
	public final void create() {
		super.create();

		// Do some basic stuff
		this.batch = new SpriteBatch();

		// Push the first screen using a blending transition
		this.screenManager.pushScreen(new GreenScreen(), new BlendingScreenTransition(batch, 1F));

		Gdx.app.debug("Game", "Initialization finished.");
	}

}

Some additional notes:

Documentation

In the wiki you can find articles detailing the usage of the library and its inner workings.