Skip to content

Commit 089df3d

Browse files
TwoButtonModal: Close post install modal before quitting the game
Prevents the modal from continuing to show if shutting down the game isn't instant
1 parent 4a0927b commit 089df3d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/gg/essential/ad/modal/TwoButtonModal.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public static TwoButtonModal postInstall() {
4444
return new TwoButtonModal(
4545
"Essential Mod will install the next time\nyou launch the game.",
4646
(x, y, width) -> {
47-
ModalButton button = new ModalButton(x, y, width, ButtonColor.GRAY, "Quit & Install", EssentialUtil::shutdown);
47+
ModalButton button = new ModalButton(x, y, width, ButtonColor.GRAY, "Quit & Install", () -> {
48+
ModalManager.INSTANCE.setModal(null);
49+
EssentialUtil.shutdown();
50+
});
4851
button.setTooltip("This will close your game!");
4952
return button;
5053
},

0 commit comments

Comments
 (0)