Easier API to add `List`s for custom GUIs
ChocolateLoverRaj opened this issue ยท 0 comments
ConfigEntryBuilder
has many methods for creating lists of built-in GUIs, like startIntList
, startStrList
, etc. It would be easier if there was a method called startList
, which could create a list based off of a custom type and another ConfigEntryBuilder
.
For example, I made a custom GUI for an Item
:
ConfigEntryBuilder.create()
.startDropdownMenu(entry.getText(), DropdownMenuBuilder.TopCellElementBuilder.ofItemObject(entry.getValue()),
DropdownMenuBuilder.CellCreatorBuilder.ofItemObject())
.setDefaultValue(entry.getDefaultValue())
.setSelections(Registry.ITEM.stream().sorted(Comparator.comparing(Item::toString))
.collect(Collectors.toCollection(LinkedHashSet::new)))
.setTooltip(entry.getTooltip()).setSaveConsumer(entry::setValue);
It would be nice if I could make a custom GUI for List<Item>
:
ConfigEntryBuilder.create()
.startList(itemConfigBuilder /*, other parameters */),