From 72e0fc7cbdc552719f2d7d47c7299aa5444d7a1a Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Mon, 2 Dec 2024 08:31:14 +0100 Subject: [PATCH] added documentation for GateFieldCard --- .../client/gui/popups/GateFieldCard.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GateFieldCard.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GateFieldCard.java index fa6674c..7f01ff2 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GateFieldCard.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/GateFieldCard.java @@ -21,10 +21,20 @@ import pp.monopoly.notification.Sound; * GateFieldCard creates the popup for field information */ public class GateFieldCard extends Dialog { + /** Reference to the Monopoly application instance. */ private final MonopolyApp app; + + /** Main container for the gate field information. */ private final Container gateFieldContainer; + + /** Background container providing a border for the popup. */ private final Container backgroundContainer; + /** + * Constructs a GateFieldCard popup displaying details about a gate field. + * + * @param app the Monopoly application instance + */ public GateFieldCard(MonopolyApp app) { super(app.getDialogManager()); this.app = app; @@ -100,9 +110,9 @@ public class GateFieldCard 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()); @@ -116,7 +126,7 @@ public class GateFieldCard extends Dialog { } /** - * Schließt das Menü und entfernt die GUI-Elemente. + * Closes the popup and removes its associated GUI elements. */ @Override public void close() { @@ -125,6 +135,9 @@ public class GateFieldCard extends Dialog { super.close(); } + /** + * Opens the settings menu when the escape key is pressed. + */ @Override public void escape() { new SettingsMenu(app).open();