From 88dc633e8e7ba39cefa908fe9684194f6d4f692d Mon Sep 17 00:00:00 2001 From: Simon Wilkening Date: Fri, 22 Nov 2024 00:44:36 +0100 Subject: [PATCH] =?UTF-8?q?W=C3=BCrfellogik=20mit=20toolbar=20erneut=20ver?= =?UTF-8?q?bunden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/src/main/java/pp/monopoly/client/gui/Toolbar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/Toolbar.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/Toolbar.java index a2201b5..3ce22f7 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/Toolbar.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/Toolbar.java @@ -73,7 +73,7 @@ public class Toolbar extends Dialog { // Menü-Container: Ein Container für Würfel Container diceContainer = toolbarContainer.addChild(new Container()); diceContainer.addChild(new Label("Wo Würfel?", new ElementId("label"))); - diceContainer.addChild(new Button("Würfeln")); + diceContainer.addChild(addDiceRollButton()); diceContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f))); // Menü-Container: Ein Nested-Container für Handeln, Grundstücke und Zug beenden @@ -118,11 +118,12 @@ public class Toolbar extends Dialog { /** * Fügt den Würfel-Button hinzu, der die Figur entsprechend der gewürfelten Zahl bewegt. */ - private void addDiceRollButton() { + private Button addDiceRollButton() { Button diceButton = new Button("Würfeln"); diceButton.setPreferredSize(new Vector3f(150, 50, 0)); // Größe des Buttons diceButton.addClickCommands(source -> rollDice()); toolbarContainer.addChild(diceButton); + return diceButton; } private void addTradeMenuButton() {