From 5cacff39b7829eb39a7e9153aa58d62fffc1120e Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Mon, 25 Nov 2024 05:42:45 +0100 Subject: [PATCH] refactor typo --- .../client/gui/popups/LoserPopUp.java | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/LoserPopUp.java diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/LoserPopUp.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/LoserPopUp.java deleted file mode 100644 index 7b7ea90..0000000 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/LoserPopUp.java +++ /dev/null @@ -1,55 +0,0 @@ -package pp.monopoly.client.gui.popups; - -import com.jme3.asset.TextureKey; -import com.jme3.math.Vector2f; -import com.jme3.texture.Texture; -import com.simsilica.lemur.Button; -import com.simsilica.lemur.Container; -import com.simsilica.lemur.Label; -import com.simsilica.lemur.component.IconComponent; - -import pp.dialog.Dialog; -import pp.monopoly.client.MonopolyApp; - -public class LoserPopUp extends Dialog { - - private final MonopolyApp app; - - /** - * Constructs a new NetworkDialog. - * - * @param network The NetworkSupport instance to be used for network operations. - */ - public LoserPopUp(MonopolyApp app) { - super(app.getDialogManager()); - this.app = app; - initializeDialog(); - } - - /** - * Initializes the dialog with input fields and connection buttons. - */ - private void initializeDialog() { - Container inputContainer = new Container(); - - // Titel und Eingabefelder für Host und Port - inputContainer.addChild(new Label("Schade, du hast leider verloren!")); - inputContainer.addChild(new Label("Die nächste Runde wird besser!")); - - Label imageLabel = new Label(""); - TextureKey key = new TextureKey("Pictures/MonopolyLoser.png", true); - Texture texture = app.getAssetManager().loadTexture(key); - IconComponent icon = new IconComponent(texture.toString()); // Icon mit Textur erstellen - icon.setIconSize(new Vector2f(155f, 120f)); // Skalierung des Bildes - imageLabel.setIcon(icon); // Setze das Icon im Label - - inputContainer.addChild(imageLabel); - - Button cancelButton = inputContainer.addChild(new Button("Spiel beenden")); - cancelButton.addClickCommands(source -> ifTopDialog(app::closeApp)); - inputContainer.setLocalTranslation(300,500,0); - attachChild(inputContainer); - - } -} -