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 Gulag
This commit is contained in:
parent
cc157a3cf3
commit
a4c0afe277
@ -16,16 +16,29 @@ import pp.monopoly.client.MonopolyApp;
|
||||
import pp.monopoly.notification.Sound;
|
||||
|
||||
/**
|
||||
* Gulag is a warning popup that is triggered when a certain player enters the "Wache" field
|
||||
* Gulag is a warning popup triggered when a player lands on the "Wache" field in the Monopoly game.
|
||||
* <p>
|
||||
* This popup informs the player that they are being sent to the Gulag and includes a confirmation button.
|
||||
* </p>
|
||||
*/
|
||||
public class Gulag 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 Gulag warning message. */
|
||||
private final Container gulagContainer;
|
||||
|
||||
/** Background container providing a border for the popup. */
|
||||
private final Container backgroundContainer;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs the Gulag popup, displaying a warning when a player lands on the "Wache" field.
|
||||
*
|
||||
* @param app the Monopoly application instance
|
||||
*/
|
||||
public Gulag(MonopolyApp app) {
|
||||
super(app.getDialogManager());
|
||||
this.app = app;
|
||||
@ -82,9 +95,9 @@ public class Gulag extends Dialog {
|
||||
}
|
||||
|
||||
/**
|
||||
* Erstellt einen halbtransparenten Hintergrund für das Menü.
|
||||
* Creates a semi-transparent overlay background 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());
|
||||
@ -98,7 +111,7 @@ public class Gulag extends Dialog {
|
||||
}
|
||||
|
||||
/**
|
||||
* Schließt das Menü und entfernt die GUI-Elemente.
|
||||
* Closes the popup and removes its associated GUI elements.
|
||||
*/
|
||||
@Override
|
||||
public void close() {
|
||||
@ -108,6 +121,9 @@ public class Gulag extends Dialog {
|
||||
super.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the escape action to close the popup.
|
||||
*/
|
||||
@Override
|
||||
public void escape() {
|
||||
close();
|
||||
|
Loading…
Reference in New Issue
Block a user