package pathgame.gameplay.menu;

import me.hammerle.snuviengine.api.KeyHandler;
import pathgame.gameplay.Keys;

public class OptionMenu extends BaseMenu
{
    private final MenuOption[] options; 
    
    public OptionMenu(int id, int mainId)
    {
        super(id);
        
        options = new MenuOption[] 
        {
            new MenuOption("Up Key", (gamestate) -> 
            {
                KeyHandler.rebind(Keys.UP_KEY);
            }),
            new MenuOption("Down Key", (gamestate) -> 
            {
                KeyHandler.rebind(Keys.DOWN_KEY);
            }),
            new MenuOption("Left Key", (gamestate) -> 
            {
                KeyHandler.rebind(Keys.LEFT_KEY);
            }),
            new MenuOption("Right Key", (gamestate) -> 
            {
                KeyHandler.rebind(Keys.RIGHT_KEY);
            }),
            new MenuOption("Escape Key", (gamestate) -> 
            {
                KeyHandler.rebind(Keys.ESCAPE_KEY);
            }),
            new MenuOption("Confirm Key", (gamestate) -> 
            {
                KeyHandler.rebind(Keys.CONFIRM_KEY);
            }),
            new MenuOption("Zoom In Key", (gamestate) -> 
            {
                KeyHandler.rebind(Keys.ZOOM_IN_KEY);
            }),
            new MenuOption("Zoom Out Key", (gamestate) -> 
            {
                KeyHandler.rebind(Keys.ZOOM_OUT_KEY);
            }),
            new MenuOption("Back to Main Menu", (gamestate) -> 
            {
                setReturnId(mainId);
            }),
        };
    }

    @Override
    public MenuOption[] getOptions()
    {
        return options;
    }

    @Override
    public boolean isOptionMenu()
    {
        return true;
    }
}