package gui.menu;

import gui.SudokuSelector;
import imgui.ImGui;

public class SoloMenu extends BaseView {

	private final SudokuSelector sudokuSelector;

	public SoloMenu(StateMachine stateMachine) {
		super(stateMachine);
		this.sudokuSelector = new SudokuSelector(true);
		this.sudokuSelector.onSelect.connect(this::pushSudokuState);
	}

	private void pushSudokuState() {
		this.stateMachine.pushState(new SudokuView(stateMachine, this.sudokuSelector.getDoku()));
	}

	@Override
	public void render() {
		ImGui.text("Solo");
		sudokuSelector.render();
		renderReturnButton();
	}

}
