Popups now remove themselves

This commit is contained in:
lieght
2025-12-04 20:54:28 +01:00
parent 4608135ee5
commit f205669b41
2 changed files with 5 additions and 2 deletions

View File

@@ -33,7 +33,10 @@ public final class ChallengePopup extends PopupWidget {
var gameText = Primitive.text(AppContext.getString("to-a-game-of") + " " + game, false); var gameText = Primitive.text(AppContext.getString("to-a-game-of") + " " + game, false);
var acceptButton = Primitive.button("accept", () -> onAccept.accept(playerInformation)); var acceptButton = Primitive.button("accept", () -> {
onAccept.accept(playerInformation);
this.hide();
});
var denyButton = Primitive.button("deny", () -> hide()); var denyButton = Primitive.button("deny", () -> hide());
var leftSection = Primitive.vbox( var leftSection = Primitive.vbox(

View File

@@ -61,7 +61,7 @@ public final class SendChallengePopup extends PopupWidget {
var sendButton = Primitive.button( var sendButton = Primitive.button(
"send", "send",
() -> onSend.accept(playerInformation, gameChoice.getValue()) () -> { onSend.accept(playerInformation, gameChoice.getValue()); this.hide(); }
); );
var cancelButton = Primitive.button("cancel", () -> hide()); var cancelButton = Primitive.button("cancel", () -> hide());