Hi,
I am trying to get a string as a userinput, but I also want to give the user an option to chose the previous value, stored in the Settings.
OptionToggle togglePrevious = new OptionToggle(false, previousSuggestion, previousSuggestion);
int optionPrevious = gs.AddOptionToggle("UsePrevious", ref togglePrevious);
GetResult res = gs.Get();
if (res == GetResult.Option)
{
var option = gs.Option();
if (option.Index == optionPrevious)
{
name = previousSuggestion;
break;
}
I detected that the GetResult
when clicking the option is not a GetResult.Option
, but a GetResult.String
, which is very confusing for me right now.
Let’s say the variable previousSuggestion
has value Test
, the string returned is UsePrevious=Test
, which is very confusing for me.
I am sure I messed up something, but I am not sure what!
Thanks,
T.