mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
Popups now remove themselves
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user