mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 00:06:16 +01:00
added documentation for BuildingAdminMenu
This commit is contained in:
parent
d0ba0d011f
commit
3539b1cf23
@ -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.
|
||||
* <p>
|
||||
* Provides options to manage properties, including building houses, demolishing houses,
|
||||
* taking mortgages, repaying mortgages, and viewing an overview of owned properties.
|
||||
* </p>
|
||||
*/
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user