From 9e81fb8549d8c3de194ba33a5febcef2598881bc Mon Sep 17 00:00:00 2001 From: Simon Wilkening Date: Fri, 6 Dec 2024 13:17:57 +0100 Subject: [PATCH] =?UTF-8?q?TopDialog=20in=20Propertyoverview=20eingef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/pp/monopoly/client/gui/PropertyOverviewMenu.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/PropertyOverviewMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/PropertyOverviewMenu.java index 5a8d82a..8da6069 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/PropertyOverviewMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/PropertyOverviewMenu.java @@ -17,6 +17,7 @@ import pp.monopoly.model.fields.BuildingProperty; import pp.monopoly.model.fields.FoodField; import pp.monopoly.model.fields.GateField; import pp.monopoly.model.fields.PropertyField; +import pp.monopoly.notification.Sound; import java.text.Collator; import java.util.ArrayList; @@ -78,7 +79,11 @@ public class PropertyOverviewMenu extends Dialog { // Add the "Zurück" button at the bottom Button backButton = mainContainer.addChild(new Button("Zurück", new ElementId("button"))); backButton.setPreferredSize(new Vector3f(200, 60, 0)); - backButton.addClickCommands(source -> this.close()); + backButton.addClickCommands(source -> ifTopDialog( () -> { + app.getGameLogic().playSound(Sound.BUTTON); + close(); + + })); // Attach the main container to the GUI node app.getGuiNode().attachChild(mainContainer);