diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BuildingAdminMenu.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BuildingAdminMenu.java index d903c03..3e6d134 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BuildingAdminMenu.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/BuildingAdminMenu.java @@ -18,18 +18,46 @@ import pp.monopoly.client.gui.popups.SellHouse; import pp.monopoly.client.gui.popups.TakeMortage; import pp.monopoly.notification.Sound; +/** + * Represents the building administration menu in the Monopoly application. + *
+ * Provides options to manage properties, including building houses, demolishing houses, + * taking mortgages, repaying mortgages, and viewing an overview of owned properties. + *
+ */ public class BuildingAdminMenu extends Dialog { + /** Reference to the Monopoly application instance. */ private final MonopolyApp app; + /** Main container for the menu's UI components. */ private final Container mainContainer; + + /** Background geometry for the menu. */ private Geometry background; + + /** Button to navigate back to the previous menu. */ private final Button backButton = new Button("Zurück"); + + /** Button to build houses on properties. */ private final Button buildButton = new Button("Bauen"); + + /** Button to demolish houses on properties. */ private final Button demolishButton = new Button("Abriss"); + + /** Button to take out a mortgage on properties. */ private final Button takeMortgageButton = new Button("Hypothek aufnehmen"); + + /** Button to repay a mortgage on properties. */ private final Button payMortgageButton = new Button("Hypothek bezahlen"); + + /** Button to open the property overview menu. */ private final Button overviewButton = new Button("Übersicht"); + /** + * Constructs the building administration menu. + * + * @param app the Monopoly application instance + */ public BuildingAdminMenu(MonopolyApp app) { super(app.getDialogManager()); this.app = app; @@ -163,6 +191,9 @@ public class BuildingAdminMenu extends Dialog { app.getGuiNode().attachChild(background); } + /** + * Closes the building administration menu and detaches its elements from the GUI. + */ @Override public void close() { app.getGuiNode().detachChild(mainContainer); @@ -170,11 +201,19 @@ public class BuildingAdminMenu extends Dialog { super.close(); } + /** + * Opens the settings menu when the escape key is pressed. + */ @Override public void escape() { new SettingsMenu(app).open(); } + /** + * Periodic updates for the menu, if required. + * + * @param delta Time since the last update in seconds. + */ @Override public void update(float delta) { // Periodic updates if necessary