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 LooserPopUp
This commit is contained in:
parent
69ad19757d
commit
bffe614b54
@ -16,10 +16,23 @@ import pp.dialog.Dialog;
|
|||||||
import pp.monopoly.client.MonopolyApp;
|
import pp.monopoly.client.MonopolyApp;
|
||||||
import pp.monopoly.notification.Sound;
|
import pp.monopoly.notification.Sound;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LooserPopUp is a dialog that appears when a player loses the game.
|
||||||
|
* <p>
|
||||||
|
* This popup provides a message of encouragement and an option to quit the game.
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
public class LooserPopUp extends Dialog {
|
public class LooserPopUp extends Dialog {
|
||||||
|
/** Reference to the Monopoly application instance. */
|
||||||
private final MonopolyApp app;
|
private final MonopolyApp app;
|
||||||
|
|
||||||
|
/** Semi-transparent overlay background for the dialog. */
|
||||||
private final Geometry overlayBackground;
|
private final Geometry overlayBackground;
|
||||||
|
|
||||||
|
/** Main container for the "Looser" dialog UI. */
|
||||||
private final Container LooserContainer;
|
private final Container LooserContainer;
|
||||||
|
|
||||||
|
/** Background container providing a styled border around the main dialog. */
|
||||||
private final Container backgroundContainer;
|
private final Container backgroundContainer;
|
||||||
|
|
||||||
|
|
||||||
@ -95,9 +108,9 @@ public class LooserPopUp 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 overlay geometry.
|
||||||
*/
|
*/
|
||||||
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());
|
||||||
@ -111,7 +124,7 @@ public class LooserPopUp extends Dialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Schließt das Menü und entfernt die GUI-Elemente.
|
* Closes the LooserPopUp dialog and removes its GUI elements.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
@ -121,6 +134,9 @@ public class LooserPopUp extends Dialog {
|
|||||||
super.close();
|
super.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles the escape action to close the dialog.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void escape() {
|
public void escape() {
|
||||||
close();
|
close();
|
||||||
|
Loading…
Reference in New Issue
Block a user