From c87406f60eea29d17097efde3edcd6d13e8e24e7 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Mon, 25 Nov 2024 00:52:10 +0100 Subject: [PATCH] fixed esc menu --- .../src/main/java/pp/monopoly/client/gui/LobbyMenu.java | 4 ++-- .../src/main/java/pp/monopoly/client/gui/StartMenu.java | 2 +- 2 files changed, 3 insertions(+), 3 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 3ff268e..9d14194 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 @@ -146,7 +146,7 @@ public class LobbyMenu extends Dialog { readyButton.setPreferredSize(new Vector3f(200, 60, 0)); // Set size to match the appearance in the image readyButton.setFontSize(18); // Adjust font size readyButton.setBackground(new QuadBackgroundComponent(ColorRGBA.Green)); // Add color to match the style - readyButton.addClickCommands(source -> toggleReady(null)); // Add functionality + readyButton.addClickCommands(source -> toggleReady()); // Add functionality lowerRightMenu.addChild(readyButton); // Position the container near the bottom-right corner @@ -204,7 +204,7 @@ public class LobbyMenu extends Dialog { /** * Schaltet den "Bereit"-Status um. */ - private void toggleReady(Label playersLabel) { + private void toggleReady() { app.getGameLogic().send(new PlayerReady(true, playerInputField.getText(), figure, Integer.parseInt(startingCapital.getText()))); } diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/StartMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/StartMenu.java index 8f584b6..5b7bf07 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/StartMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/StartMenu.java @@ -117,7 +117,7 @@ public class StartMenu extends Dialog { @Override public void escape() { - close(); + super.close(); } @Override