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 Bankrupt
This commit is contained in:
parent
3a43ea10d9
commit
9e50c1afe2
@ -18,13 +18,24 @@ import pp.monopoly.client.MonopolyApp;
|
||||
* Bankrupt is a Warning-Popup which appears when the balance is negative at the end of a player´s turn
|
||||
*/
|
||||
public class Bankrupt 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 bankruptcy warning content. */
|
||||
private final Container bankruptContainer;
|
||||
|
||||
/** Background container providing a border for the popup. */
|
||||
private final Container backgroundContainer;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs the bankruptcy warning popup.
|
||||
*
|
||||
* @param app the Monopoly application instance
|
||||
*/
|
||||
public Bankrupt(MonopolyApp app) {
|
||||
super(app.getDialogManager());
|
||||
this.app = app;
|
||||
@ -85,9 +96,9 @@ public class Bankrupt 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());
|
||||
@ -111,6 +122,9 @@ public class Bankrupt extends Dialog {
|
||||
super.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the escape key action by closing the popup.
|
||||
*/
|
||||
@Override
|
||||
public void escape() {
|
||||
close();
|
||||
|
Loading…
Reference in New Issue
Block a user