Use FitViewport in MainMenuScreen for proper resizing (#60)
This commit is contained in:
parent
c61b4827c1
commit
f1e0f3c7fd
1 changed files with 2 additions and 0 deletions
|
@ -26,6 +26,7 @@ import com.badlogic.gdx.scenes.scene2d.InputListener;
|
||||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
|
|
||||||
import dev.lonami.klooni.Klooni;
|
import dev.lonami.klooni.Klooni;
|
||||||
import dev.lonami.klooni.actors.SoftButton;
|
import dev.lonami.klooni.actors.SoftButton;
|
||||||
|
@ -57,6 +58,7 @@ public class MainMenuScreen extends InputListener implements Screen {
|
||||||
Table table = new Table();
|
Table table = new Table();
|
||||||
table.setFillParent(true);
|
table.setFillParent(true);
|
||||||
stage.addActor(table);
|
stage.addActor(table);
|
||||||
|
stage.setViewport(new FitViewport(Klooni.GAME_WIDTH, Klooni.GAME_HEIGHT));
|
||||||
|
|
||||||
// Play button
|
// Play button
|
||||||
final SoftButton playButton = new SoftButton(
|
final SoftButton playButton = new SoftButton(
|
||||||
|
|
Loading…
Reference in a new issue