From e1e7f2eaf6fd8e7c1f4ee297518b29a58615bd08 Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Sat, 23 Nov 2024 23:07:42 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=C3=BCberschneidungen=20von=20elementen=20b?= =?UTF-8?q?eseitigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pp/monopoly/client/gui/LobbyMenu.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java index f329e34..5111db9 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java @@ -31,6 +31,9 @@ public class LobbyMenu { private final MonopolyApp app; private final Container menuContainer; private Geometry background; + private Geometry circle; + private Container lowerLeftMenu; + private Container lowerRightMenu; public LobbyMenu(MonopolyApp app) { this.app = app; @@ -120,19 +123,19 @@ public class LobbyMenu { buttonContainer.setInsets(new Insets3f(20, 0, 10, 0)); // Add spacing above the buttons buttonContainer.setBackground(null); // Lower-left container for "Abbrechen" button - Container lowerLeftMenu = new Container(); + lowerLeftMenu = new Container(); Button cancelButton = new Button("Abbrechen"); cancelButton.setPreferredSize(new Vector3f(200, 60, 0)); // Set size to match the appearance in the image cancelButton.setFontSize(18); // Adjust font size cancelButton.addClickCommands(source -> goBackToCreateGame()); // Add functionality lowerLeftMenu.addChild(cancelButton); -// Position the container near the bottom-left corner + // Position the container near the bottom-left corner lowerLeftMenu.setLocalTranslation(new Vector3f(120, 170, 3)); // Adjust X and Y to align with the bottom-left corner app.getGuiNode().attachChild(lowerLeftMenu); -// Lower-right container for "Bereit" button - Container lowerRightMenu = new Container(); + // Lower-right container for "Bereit" button + lowerRightMenu = new Container(); Button readyButton = new Button("Bereit"); readyButton.setPreferredSize(new Vector3f(200, 60, 0)); // Set size to match the appearance in the image readyButton.setFontSize(18); // Adjust font size @@ -140,12 +143,12 @@ public class LobbyMenu { readyButton.addClickCommands(source -> toggleReady(null)); // Add functionality lowerRightMenu.addChild(readyButton); -// Position the container near the bottom-right corner + // Position the container near the bottom-right corner lowerRightMenu.setLocalTranslation(new Vector3f(app.getCamera().getWidth() - 320, 170, 3)); // X: 220px from the right, Y: 50px above the bottom app.getGuiNode().attachChild(lowerRightMenu); // Add a colored circle between the input field and the dropdown menu - Geometry circle = createCircle( ColorRGBA.Red); // 50 is the diameter, Red is the color + circle = createCircle( ColorRGBA.Red); // 50 is the diameter, Red is the color circle.setLocalTranslation(new Vector3f( (app.getCamera().getWidth()) / 2, // Center horizontally (app.getCamera().getHeight() / 2) - 90, // Adjust Y position @@ -205,7 +208,10 @@ public class LobbyMenu { */ private void goBackToCreateGame() { app.getGuiNode().detachChild(menuContainer); - app.getGuiNode().detachChild(background); // Entfernt das Hintergrundbild + app.getGuiNode().detachChild(background); + app.getGuiNode().detachChild(circle); + app.getGuiNode().detachChild(lowerLeftMenu); + app.getGuiNode().detachChild(lowerRightMenu); new CreateGameMenu(app); } From 75d5a15bdb78c6d70016596458deb08458170ca3 Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Sat, 23 Nov 2024 23:19:53 +0100 Subject: [PATCH 2/2] =?UTF-8?q?defaultwerte=20in=20die=20Lobby=20eingef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/pp/monopoly/client/gui/LobbyMenu.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java index 5111db9..74fe0c3 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/LobbyMenu.java @@ -64,7 +64,7 @@ public class LobbyMenu { spacerBeforeInput.setPreferredSize(new Vector3f(20, 1, 0)); // Width of the spacer // Add an input field (TextField) - TextField startingCapital = horizontalContainer.addChild(new TextField("")); + TextField startingCapital = horizontalContainer.addChild(new TextField("15 000")); startingCapital.setPreferredWidth(100); // Set the width of the input field startingCapital.setPreferredSize(new Vector3f(150, 50, 0)); startingCapital.setInsets(new Insets3f(5, 10, 5, 10)); // Add padding around the text inside the field @@ -91,7 +91,7 @@ public class LobbyMenu { playerInputContainer.setBackground(null); - TextField playerInputField = new TextField(""); + TextField playerInputField = new TextField("Spieler 1"); playerInputField.setPreferredSize(new Vector3f(100, 20, 0)); playerInputField.setInsets(new Insets3f(5, 10, 5, 10)); // Add padding for the text inside the field playerInputField.setBackground(new QuadBackgroundComponent(ColorRGBA.Black)); @@ -106,10 +106,12 @@ public class LobbyMenu { figureDropdownContainer.setBackground(null); VersionedList figures = new VersionedList<>(); - figures.add("Hund"); + figures.add("Laptop"); + figures.add("Flugzeug"); + figures.add("Jägermeister"); figures.add("Katze"); - figures.add("Panzer"); - figures.add("Pot"); + figures.add("OOP"); + figures.add("Handyholster"); Selector figureDropdown = new Selector<>(figures, "glass"); figureDropdown.setBackground(new QuadBackgroundComponent(ColorRGBA.DarkGray));