Skip to content

Commit

Permalink
refactor: Improve the action types
Browse files Browse the repository at this point in the history
  • Loading branch information
crykn committed Dec 27, 2023
1 parent 42827cb commit 65d401a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions game/src/main/java/de/eskalon/gg/screens/MainMenuScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public boolean touchDown(InputEvent event, float x, float y,
sequence.addAction(Actions.delay(!appContext.getObjectStorage()
.containsKey("mainmenu_already_shown") ? 0.85F : 0.17F));
sequence.addAction(Actions.parallel(
Actions.alpha(1F, 1.6F, Interpolation.pow2In), sequence2));
Actions.fadeIn(1.6F, Interpolation.pow2In), sequence2));

stage.addAction(Actions.alpha(0F));
stage.addAction(sequence);
Expand Down Expand Up @@ -131,8 +131,10 @@ protected void onClick() {
sequence2.addAction(Actions.run(
() -> screenManager.pushScreen(nextScreen, transition)));

// FIXME: shortly before switching the screen, the UI is flickering

stageToFadeOut.addAction(Actions.parallel(
Actions.alpha(0F, 0.45F, Interpolation.pow2In), sequence2));
Actions.fadeOut(0.45F, Interpolation.pow2In), sequence2));
}

}
Expand Down

0 comments on commit 65d401a

Please sign in to comment.