данный код хорошо справляется со своей задачей, в игре всё правильно отрисовывается и работает
this.camera = new OrthographicCamera();
this.camera.position.set(Gdx.graphics.getWidth()/ 2, Gdx.graphics.getHeight() / 2, 0);
this.camera.update()
this.viewport = new FitViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), camera);
А вот код кнопок меню
Skin skin = new Skin();
skin.add("simpleButton", new TextureRegion(atlas.findRegion("Simpl")));
TextButton.TextButtonStyle textButtonStyle = new TextButton.TextButtonStyle();
textButtonStyle.up = skin.newDrawable("simpleButton", Color.DARK_GRAY);
textButtonStyle.down = skin.newDrawable("simpleButton", Color.GOLD);
textButtonStyle.checked = skin.newDrawable("simpleButton", Color.BLUE);
textButtonStyle.over = skin.newDrawable("simpleButton", Color.LIGHT_GRAY);
textButtonStyle.font = font24;
Group group = new Group();//кнопки меню
final TextButton start1Button = new TextButton("Start 1P", textButtonStyle);
final TextButton start2Button = new TextButton("Start 2P", textButtonStyle);
final TextButton exitButton = new TextButton("Exit", textButtonStyle);
....
exitButton.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
Gdx.app.exit();
}
});//выход из игры
//позиции кнопок относительно друг друга
start1Button.setPosition(0, 80);
start2Button.setPosition(0, 40);
exitButton.setPosition(0, 0);
//добавление кнопок в группу
group.addActor(start1Button);
group.addActor(start2Button);
group.addActor(exitButton);
group.setPosition(580, 340);//позиция группы кнопок
stage.addActor(group);//добавляем группу на страницу
Gdx.input.setInputProcessor(stage);