From 09e12fc610bb9b915b44fccfb9aa958268cc31b9 Mon Sep 17 00:00:00 2001 From: Simon Wilkening Date: Sun, 1 Dec 2024 22:08:28 +0100 Subject: [PATCH] GulagInfo renamed --- .../monopoly/client/gui/popups/GulagInfo.java | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GulagInfo.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GulagInfo.java index 19c7e69..5de3aea 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GulagInfo.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GulagInfo.java @@ -9,10 +9,6 @@ import com.simsilica.lemur.style.ElementId; import pp.dialog.Dialog; import pp.monopoly.client.MonopolyApp; import pp.monopoly.client.gui.SettingsMenu; -import pp.monopoly.client.gui.TradeMenu; -import pp.monopoly.message.client.TradeResponse; -import pp.monopoly.model.TradeHandler; -import pp.monopoly.model.fields.PropertyField; import pp.monopoly.notification.Sound; /** @@ -20,7 +16,7 @@ import pp.monopoly.notification.Sound; */ public class GulagInfo extends Dialog { private final MonopolyApp app; - private final Container confirmTradeContainer; + private final Container gulagInfoContainer; private final Container backgroundContainer; @@ -34,19 +30,19 @@ public class GulagInfo extends Dialog { attachChild(backgroundContainer); // Hauptcontainer für das Bestätigungspopup - confirmTradeContainer = new Container(); + gulagInfoContainer = new Container(); float padding = 10; // Passt den backgroundContainer an die Größe des confirmTradeContainer an - backgroundContainer.setPreferredSize(confirmTradeContainer.getPreferredSize().addLocal(padding, padding, 0)); + backgroundContainer.setPreferredSize(gulagInfoContainer.getPreferredSize().addLocal(padding, padding, 0)); // Titel - Label title = confirmTradeContainer.addChild(new Label( "Gulag", new ElementId("warning-title"))); + Label title = gulagInfoContainer.addChild(new Label( "Gulag", new ElementId("warning-title"))); title.setFontSize(48); title.setColor(ColorRGBA.Black); // Text, der auf der Karte steht // Die Werte werden dem Handel entnommen (Iwas auch immer da dann ist) - Container propertyValuesContainer = confirmTradeContainer.addChild(new Container()); + Container propertyValuesContainer = gulagInfoContainer.addChild(new Container()); propertyValuesContainer.addChild(new Label("„Du sitzt im Gefänginis und kommst nicht raus ...", new ElementId("label-Text"))); propertyValuesContainer.addChild(new Label("Es sei denn, du ...", new ElementId("label-Text")));// Leerzeile propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); @@ -64,42 +60,42 @@ public class GulagInfo extends Dialog { // Bezahlen-Button - Button negotiateButton = confirmTradeContainer.addChild(new Button("Bestechungsgeld bezahlen", new ElementId("button"))); - negotiateButton.setFontSize(32); - negotiateButton.addClickCommands(s -> ifTopDialog( () -> { + Button payButton = gulagInfoContainer.addChild(new Button("Bestechungsgeld bezahlen", new ElementId("button"))); + payButton.setFontSize(32); + payButton.addClickCommands(s -> ifTopDialog( () -> { app.getGameLogic().playSound(Sound.BUTTON); close(); })); // Ereigniskarte-Button - Button confirmButton = confirmTradeContainer.addChild(new Button("Ereigniskarte nutzen", new ElementId("button"))); - confirmButton.setFontSize(32); - confirmButton.addClickCommands(s -> ifTopDialog( () -> { + Button eventCardButton = gulagInfoContainer.addChild(new Button("Ereigniskarte nutzen", new ElementId("button"))); + eventCardButton.setFontSize(32); + eventCardButton.addClickCommands(s -> ifTopDialog( () -> { app.getGameLogic().playSound(Sound.BUTTON); close(); })); // Schließen-Button - Button declineButton = confirmTradeContainer.addChild(new Button("Schließen", new ElementId("button"))); - declineButton.setFontSize(32); - declineButton.addClickCommands(s -> ifTopDialog(() -> { + Button closeButton = gulagInfoContainer.addChild(new Button("Schließen", new ElementId("button"))); + closeButton.setFontSize(32); + closeButton.addClickCommands(s -> ifTopDialog(() -> { app.getGameLogic().playSound(Sound.BUTTON); close(); })); // Zentriere das Menü - confirmTradeContainer.setLocalTranslation( - (app.getCamera().getWidth() - confirmTradeContainer.getPreferredSize().x) / 2, - (app.getCamera().getHeight() + confirmTradeContainer.getPreferredSize().y) / 2, + gulagInfoContainer.setLocalTranslation( + (app.getCamera().getWidth() - gulagInfoContainer.getPreferredSize().x) / 2, + (app.getCamera().getHeight() + gulagInfoContainer.getPreferredSize().y) / 2, 8 ); // Zentriere das Menü backgroundContainer.setLocalTranslation( - (app.getCamera().getWidth() - confirmTradeContainer.getPreferredSize().x - padding) / 2, - (app.getCamera().getHeight() + confirmTradeContainer.getPreferredSize().y+ padding) / 2, + (app.getCamera().getWidth() - gulagInfoContainer.getPreferredSize().x - padding) / 2, + (app.getCamera().getHeight() + gulagInfoContainer.getPreferredSize().y+ padding) / 2, 7 ); - app.getGuiNode().attachChild(confirmTradeContainer); + app.getGuiNode().attachChild(gulagInfoContainer); } /** @@ -107,7 +103,7 @@ public class GulagInfo extends Dialog { */ @Override public void close() { - app.getGuiNode().detachChild(confirmTradeContainer); // Entferne das Menü + app.getGuiNode().detachChild(gulagInfoContainer); // Entferne das Menü app.getGuiNode().detachChild(backgroundContainer); //Entfernt Rand super.close(); }