mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +01:00
added documentation for EventCardPopup
This commit is contained in:
parent
25361933d7
commit
7a658cb3d6
@ -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
|
* EventCardPopup is a popup which appears when a certain EventCard is triggered by entering a EventCardField
|
||||||
*/
|
*/
|
||||||
public class EventCardPopup extends Dialog {
|
public class EventCardPopup extends Dialog {
|
||||||
|
/** Reference to the Monopoly application instance. */
|
||||||
private final MonopolyApp app;
|
private final MonopolyApp app;
|
||||||
|
|
||||||
|
/** Semi-transparent overlay background for the popup. */
|
||||||
private final Geometry overlayBackground;
|
private final Geometry overlayBackground;
|
||||||
|
|
||||||
|
/** Main container for the event card information. */
|
||||||
private final Container eventCardContainer;
|
private final Container eventCardContainer;
|
||||||
|
|
||||||
|
/** Background container providing a border for the popup. */
|
||||||
private final Container backgroundContainer;
|
private final Container backgroundContainer;
|
||||||
|
|
||||||
|
/** The description of the event card. */
|
||||||
private final String description;
|
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) {
|
public EventCardPopup(MonopolyApp app, String description) {
|
||||||
super(app.getDialogManager());
|
super(app.getDialogManager());
|
||||||
this.app = app;
|
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() {
|
private Geometry createOverlayBackground() {
|
||||||
Quad quad = new Quad(app.getCamera().getWidth(), app.getCamera().getHeight());
|
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
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
@ -112,6 +126,9 @@ public class EventCardPopup extends Dialog {
|
|||||||
super.close();
|
super.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles the escape key action by closing the popup.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void escape() {
|
public void escape() {
|
||||||
close();
|
close();
|
||||||
|
Loading…
Reference in New Issue
Block a user