hide undo button on game over screen (because you lost, no backsies)

This commit is contained in:
Rusty Striker 2024-09-18 22:29:08 +03:00
parent ef8f9c0797
commit d8a304c6e4
Signed by: RustyStriker
GPG key ID: 87E4D691632DFF15

View file

@ -56,6 +56,7 @@ class PauseMenuStage extends Stage {
private final BaseScorer scorer; private final BaseScorer scorer;
private final SoftButton playButton; private final SoftButton playButton;
private final SoftButton customButton; // Customize & "Shut down" private final SoftButton customButton; // Customize & "Shut down"
private final SoftButton undoButton;
//endregion //endregion
@ -114,9 +115,9 @@ class PauseMenuStage extends Stage {
playButton.addListener(playChangeListener); playButton.addListener(playChangeListener);
// UNDO :)))))) // UNDO :))))))
undoButton = new SoftButton(3, "back_texture");
if(gameMode == 0) // this is kinda bad but meh for now, 0 is normal game, so no undo in the time thingy! if(gameMode == 0) // this is kinda bad but meh for now, 0 is normal game, so no undo in the time thingy!
{ {
SoftButton undoButton = new SoftButton(3, "back_texture");
undoButton.setPosition( undoButton.setPosition(
(Gdx.graphics.getWidth() - undoButton.getWidth())* 0.5f, (Gdx.graphics.getWidth() - undoButton.getWidth())* 0.5f,
Gdx.graphics.getHeight() * 0.25f Gdx.graphics.getHeight() * 0.25f
@ -204,6 +205,7 @@ class PauseMenuStage extends Stage {
Gdx.app.exit(); Gdx.app.exit();
} }
}); });
undoButton.setVisible(false);
if (game.shareChallenge != null) { if (game.shareChallenge != null) {
playButton.removeListener(playChangeListener); playButton.removeListener(playChangeListener);