diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/EventCardPopup.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/EventCardPopup.java index e02413b..dc02fb0 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/EventCardPopup.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/EventCardPopup.java @@ -19,13 +19,27 @@ import pp.monopoly.notification.Sound; * EventCardPopup is a popup which appears when a certain EventCard is triggered by entering a EventCardField */ public class EventCardPopup 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 event card information. */ private final Container eventCardContainer; + + /** Background container providing a border for the popup. */ private final Container backgroundContainer; + + /** The description of the event card. */ private final String description; - + /** + * Constructs the EventCardPopup to display the details of a triggered event card. + * + * @param app the Monopoly application instance + * @param description the description of the triggered event card + */ public EventCardPopup(MonopolyApp app, String description) { super(app.getDialogManager()); this.app = app; @@ -86,9 +100,9 @@ public class EventCardPopup 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()); @@ -102,7 +116,7 @@ public class EventCardPopup extends Dialog { } /** - * Schließt das Menü und entfernt die GUI-Elemente. + * Closes the popup and removes its associated GUI elements. */ @Override public void close() { @@ -112,6 +126,9 @@ public class EventCardPopup extends Dialog { super.close(); } + /** + * Handles the escape key action by closing the popup. + */ @Override public void escape() { close();