Use FitViewport in MainMenuScreen for proper resizing (#60)

This commit is contained in:
Jaeheon Shim 2019-12-28 19:06:47 -05:00 committed by Lonami
parent c61b4827c1
commit f1e0f3c7fd

View file

@ -26,6 +26,7 @@ import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import com.badlogic.gdx.utils.viewport.FitViewport;
import dev.lonami.klooni.Klooni;
import dev.lonami.klooni.actors.SoftButton;
@ -57,6 +58,7 @@ public class MainMenuScreen extends InputListener implements Screen {
Table table = new Table();
table.setFillParent(true);
stage.addActor(table);
stage.setViewport(new FitViewport(Klooni.GAME_WIDTH, Klooni.GAME_HEIGHT));
// Play button
final SoftButton playButton = new SoftButton(