Class GuiEditors.ListBuilder
java.lang.Object
dev.boze.api.gui.editor.GuiEditors.ListBuilder
- Enclosing class:
GuiEditors
-
Method Summary
Modifier and TypeMethodDescriptionbuild()button(String label, EditorButton.Role role, BooleanSupplier enabled, Consumer<ListEditor> action) button(String label, EditorButton.Role role, Consumer<ListEditor> action) Adds a button.Sets the buttons together in the middle instead of spread across the row.input(TextFieldState field, String placeholder, Consumer<String> onEnter) A text field left of the buttons.size(EditorSize size) tabs(List<String> names, IntSupplier selected, IntConsumer select) Tabs above the list.
-
Method Details
-
input
public GuiEditors.ListBuilder input(TextFieldState field, String placeholder, Consumer<String> onEnter) A text field left of the buttons. Enter passes what was typed, if anything, and clears it. -
tabs
Tabs above the list. Read the selected tab inentriesto show its rows. -
button
public GuiEditors.ListBuilder button(String label, EditorButton.Role role, Consumer<ListEditor> action) Adds a button. Its action gets the list, for example to close it. -
button
public GuiEditors.ListBuilder button(String label, EditorButton.Role role, BooleanSupplier enabled, Consumer<ListEditor> action) -
compactButtons
Sets the buttons together in the middle instead of spread across the row. -
size
- Parameters:
size- Preferred size; 128 by 288 units by default
-
build
-