added documentation for GateFieldCard

This commit is contained in:
Yvonne Schmidt 2024-12-02 08:31:14 +01:00
parent 3bfa7ff69f
commit 72e0fc7cbd

View File

@ -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();