From 9e50c1afe2d9ade3197b76229250ba64e1c7f3d5 Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Mon, 2 Dec 2024 07:59:24 +0100 Subject: [PATCH] added documentation for Bankrupt --- .../monopoly/client/gui/popups/Bankrupt.java | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/Bankrupt.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/Bankrupt.java index cd0cef0..d297d9f 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/Bankrupt.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/Bankrupt.java @@ -18,13 +18,24 @@ import pp.monopoly.client.MonopolyApp; * Bankrupt is a Warning-Popup which appears when the balance is negative at the end of a player´s turn */ public class Bankrupt extends Dialog { + /** Reference to the Monopoly application instance. */ private final MonopolyApp app; + + /** Semi-transparent overlay background for the popup. */ private final Geometry overlayBackground; + + /** Main container for the bankruptcy warning content. */ private final Container bankruptContainer; + + /** Background container providing a border for the popup. */ private final Container backgroundContainer; - + /** + * Constructs the bankruptcy warning popup. + * + * @param app the Monopoly application instance + */ public Bankrupt(MonopolyApp app) { super(app.getDialogManager()); this.app = app; @@ -85,9 +96,9 @@ public class Bankrupt 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 geometry of the overlay */ private Geometry createOverlayBackground() { Quad quad = new Quad(app.getCamera().getWidth(), app.getCamera().getHeight()); @@ -111,6 +122,9 @@ public class Bankrupt extends Dialog { super.close(); } + /** + * Handles the escape key action by closing the popup. + */ @Override public void escape() { close();