I am new to Spectre.Console. I am trying to use a simple menu for a console utility.
var choiceConfig =
new MultiSelectionPrompt<string>()
.Title("Choose currencies to process")
.PageSize(10)
.InstructionsText(
"[grey](Press [blue]<space>[/] to toggle a currency, " +
"[green]<enter>[/] to accept)[/]");
var eurChoice = choiceConfig.AddChoiceGroup("EUR", ["EUR", "EUR2"]);
choiceConfig.AddChoices(new[] {
"GBP", "USD", "CAD"
});
currencies = AnsiConsole.Prompt(choiceConfig).ToArray();
I would like the options under “EUR” to be single choice, so if I Select “EUR” “EUR2” unticks and the other way around.
Also, options Under “EUR” should display “Method 1” and “Method 2” but return the value.
Is this easy to do?
Thanks.