diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/LooserPopUp.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/LooserPopUp.java index f29fc84..a4fa023 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/LooserPopUp.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/LooserPopUp.java @@ -16,10 +16,23 @@ import pp.dialog.Dialog; import pp.monopoly.client.MonopolyApp; import pp.monopoly.notification.Sound; +/** + * LooserPopUp is a dialog that appears when a player loses the game. + *
+ * This popup provides a message of encouragement and an option to quit the game. + *
+ */ public class LooserPopUp extends Dialog { + /** Reference to the Monopoly application instance. */ private final MonopolyApp app; + + /** Semi-transparent overlay background for the dialog. */ private final Geometry overlayBackground; + + /** Main container for the "Looser" dialog UI. */ private final Container LooserContainer; + + /** Background container providing a styled border around the main dialog. */ private final Container backgroundContainer; @@ -95,9 +108,9 @@ public class LooserPopUp extends Dialog { } /** - * Erstellt einen halbtransparenten Hintergrund für das Menü. + * Creates a semi-transparent background overlay for the popup. * - * @return Geometrie des Overlays + * @return The overlay geometry. */ private Geometry createOverlayBackground() { Quad quad = new Quad(app.getCamera().getWidth(), app.getCamera().getHeight()); @@ -111,7 +124,7 @@ public class LooserPopUp extends Dialog { } /** - * Schließt das Menü und entfernt die GUI-Elemente. + * Closes the LooserPopUp dialog and removes its GUI elements. */ @Override public void close() { @@ -121,6 +134,9 @@ public class LooserPopUp extends Dialog { super.close(); } + /** + * Handles the escape action to close the dialog. + */ @Override public void escape() { close();