Class CycleButton.Builder<T>
java.lang.Object
net.minecraft.client.gui.components.CycleButton.Builder<T>
- Enclosing class:
CycleButton<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private int
private T
private Function
<CycleButton<T>, MutableComponent> private OptionInstance.TooltipSupplier
<T> private CycleButton.ValueListSupplier
<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate
(int pX, int pY, int pWidth, int pHeight, Component pName, CycleButton.OnValueChange<T> pOnValueChange) create
(Component pMessage, CycleButton.OnValueChange<T> pOnValueChange) withCustomNarration
(Function<CycleButton<T>, MutableComponent> pNarrationProvider) withInitialValue
(T pInitialValue) withTooltip
(OptionInstance.TooltipSupplier<T> pTooltipSupplier) withValues
(Collection<T> pValues) withValues
(BooleanSupplier pAltListSelector, List<T> pDefaultList, List<T> pSelectedList) withValues
(List<T> pDefaultList, List<T> pSelectedList) withValues
(CycleButton.ValueListSupplier<T> pValues) final CycleButton.Builder
<T> withValues
(T... pValues)
-
Field Details
-
initialIndex
private int initialIndex -
initialValue
-
valueStringifier
-
tooltipSupplier
-
narrationProvider
-
values
-
displayOnlyValue
private boolean displayOnlyValue
-
-
Constructor Details
-
Builder
-
-
Method Details
-
withValues
-
withValues
-
withValues
-
withValues
public CycleButton.Builder<T> withValues(BooleanSupplier pAltListSelector, List<T> pDefaultList, List<T> pSelectedList) -
withValues
-
withTooltip
-
withInitialValue
-
withCustomNarration
public CycleButton.Builder<T> withCustomNarration(Function<CycleButton<T>, MutableComponent> pNarrationProvider) -
displayOnlyValue
-
create
-
create
-
create
public CycleButton<T> create(int pX, int pY, int pWidth, int pHeight, Component pName, CycleButton.OnValueChange<T> pOnValueChange)
-