package pp.monopoly.client.gui;


import com.jme3.math.ColorRGBA;
import com.simsilica.lemur.Button;
import com.simsilica.lemur.Label;
import com.simsilica.lemur.style.ElementId;
import pp.dialog.Dialog;
import pp.monopoly.client.MonopolyApp;

public class GameMenu extends Dialog {
    private final MonopolyApp app;

    /**
     * Constructs the SettingsMenu dialog for the Monopoly application.
     *
     * @param app the MonopolyApp instance
     */
    public GameMenu(MonopolyApp app) {
        super(app.getDialogManager());
        this.app = app;

        // Add a title label for Settings
        Label settingsTitle = new Label("Einstellungen", new ElementId("settings-title"));
        settingsTitle.setFontSize(48);  // Set font size for the title
        settingsTitle.setColor(ColorRGBA.White);

        // Add any settings-related components here, such as volume control, toggles, etc.

        // Add a back button to return to StartMenu
        Button backButton = new Button("Zurück", new ElementId("menu-button"));
        backButton.setColor(ColorRGBA.White);
        backButton.setFontSize(24);
        backButton.addClickCommands(source -> returnToStartMenu());

        // Add components to this dialog
        addChild(settingsTitle);
        addChild(backButton);

        // You can add more settings components here, like checkboxes or sliders.
    }

    /**
     * Returns to the StartMenu when the back button is clicked.
     */
    private void returnToStartMenu() {
        app.getDialogManager().close(this); // Close the current settings dialog
        //TODO return zum Ausgangsmenü
    }
}
