Вот я создал кнопочку, но как-то много для одной кнопочки, может можно как-то иначе сделать?
public class PlayButton extends Button {
public static final float WIDTH = 160;
public static final float HEIGHT = 60;
MainMenuScreen screen;
public static final Drawable drawableDown = new Image(Assets.playHoverButton).getDrawable();
public static final Drawable drawableUp = new Image(Assets.playButton).getDrawable();
public PlayButton(final MainMenuScreen screen) {
super(drawableUp, drawableDown);
this.screen = screen;
setSize(WIDTH, HEIGHT);
addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
screen.getGame().setScreen(new ChooseLocationScreen(screen.getGame()));
}
});
}
}