toChoiceList
fun toChoiceList(selectedChoices: List<T> = listOf(), widgetType: ValidatedChoiceList.WidgetType = ValidatedChoiceList.WidgetType.POPUP, translationProvider: BiFunction<T, String, MutableText> = BiFunction { t, _ -> t.transLit(t.toString()) }, descriptionProvider: BiFunction<T, String, Text> = BiFunction { t, _ -> t.descLit("") }): ValidatedChoiceList<T>
Converts this ValidatedSet into ValidatedChoiceList wrapping this set as the valid choice options
Return
ValidatedChoiceList with options based on this list's contents
Author
fzzyhmstrs
Since
0.6.3
Parameters
selectedChoices
List<T> - The default selected choices of the resulting choice set. Can be empty.
descriptionProvider
BiFunction T, String, Text - converts a choice instance T and the base translation key of this into a text Description: NOTE: translation key, not description key. This is the same base key as provided to translationProvider
widgetType
ValidatedChoiceList.WidgetType defines the GUI selection type. Defaults to POPUP