package pathgame.gameplay.menu;

import me.hammerle.snuviengine.api.Engine;

/**
 * A container for holding all options of the MainMenu
 *
 * @author julia
 */
public class MainMenu extends BaseMenu
{
    private final MenuButton[] options;

    /**
     * Contructor generating and initializing the MainMenu
     *
     * @param id the id of the MainMenu
     * @param optionsId the id to the OptionMenu
     * @param characterId the id to the CharacterMenu
     */
    public MainMenu(int id, int optionsId, int characterId)
    {
        super(id);

        options = new MenuButton[]
        {
            new MenuButton("Start", (gamestate) ->
            {
                setReturnId(characterId);
            }),
            new MenuButton("Options", (gamestate) ->
            {
                setReturnId(optionsId);
            }),
            new MenuButton("Exit", (gamestate) ->
            {
                Engine.stop();
            })
        };
    }

    /**
     * Returns the options of the MainMenu
     *
     * @return the options of the MainMenu
     */
    @Override
    public MenuButton[] getOptions()
    {
        return options;
    }
}
