mirror of
				https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
				synced 2025-11-04 07:26:14 +01:00 
			
		
		
		
	added documentation for Gulag
This commit is contained in:
		@@ -16,16 +16,29 @@ import pp.monopoly.client.MonopolyApp;
 | 
				
			|||||||
import pp.monopoly.notification.Sound;
 | 
					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 {
 | 
					public class Gulag 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 Gulag warning message. */
 | 
				
			||||||
    private final Container gulagContainer;
 | 
					    private final Container gulagContainer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** Background container providing a border for the popup. */
 | 
				
			||||||
    private final Container backgroundContainer;
 | 
					    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) {
 | 
					    public Gulag(MonopolyApp app) {
 | 
				
			||||||
        super(app.getDialogManager());
 | 
					        super(app.getDialogManager());
 | 
				
			||||||
        this.app = app;
 | 
					        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() {
 | 
					    private Geometry createOverlayBackground() {
 | 
				
			||||||
        Quad quad = new Quad(app.getCamera().getWidth(), app.getCamera().getHeight());
 | 
					        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
 | 
					    @Override
 | 
				
			||||||
    public void close() {
 | 
					    public void close() {
 | 
				
			||||||
@@ -108,6 +121,9 @@ public class Gulag extends Dialog {
 | 
				
			|||||||
        super.close();
 | 
					        super.close();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Handles the escape action to close the popup.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void escape() {
 | 
					    public void escape() {
 | 
				
			||||||
        close();
 | 
					        close();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user