mirror of https://github.com/FabricMC/yarn.git
Map cycling button widget and cycling options (#2060)
* Map cycling button widget and cycling options Turns out there are still like 2 other inner classes, but I will get em Signed-off-by: liach <liach@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> Co-authored-by: liach <liach@users.noreply.github.com> Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com>
This commit is contained in:
parent
fa10065c59
commit
d4b4a7e0dc
|
@ -1,32 +1,164 @@
|
|||
CLASS net/minecraft/class_5676 net/minecraft/client/gui/widget/CyclingButtonWidget
|
||||
FIELD field_27961 HAS_ALT_DOWN Ljava/util/function/BooleanSupplier;
|
||||
FIELD field_27962 BOOLEAN_VALUES Ljava/util/List;
|
||||
FIELD field_27963 optionText Lnet/minecraft/class_2561;
|
||||
FIELD field_27964 index I
|
||||
FIELD field_27965 value Ljava/lang/Object;
|
||||
FIELD field_27966 values Lnet/minecraft/class_5676$class_5680;
|
||||
FIELD field_27967 valueToText Ljava/util/function/Function;
|
||||
FIELD field_27968 narrationMessageFactory Ljava/util/function/Function;
|
||||
FIELD field_27969 callback Lnet/minecraft/class_5676$class_5678;
|
||||
FIELD field_27970 tooltipFactory Lnet/minecraft/class_5676$class_5679;
|
||||
FIELD field_27971 optionTextOmitted Z
|
||||
METHOD <init> (IIIILnet/minecraft/class_2561;Lnet/minecraft/class_2561;ILjava/lang/Object;Lnet/minecraft/class_5676$class_5680;Ljava/util/function/Function;Ljava/util/function/Function;Lnet/minecraft/class_5676$class_5678;Lnet/minecraft/class_5676$class_5679;Z)V
|
||||
ARG 1 x
|
||||
ARG 2 y
|
||||
ARG 3 width
|
||||
ARG 4 height
|
||||
ARG 5 message
|
||||
ARG 6 optionText
|
||||
ARG 7 index
|
||||
ARG 8 value
|
||||
ARG 9 values
|
||||
ARG 10 valueToText
|
||||
ARG 11 narrationMessageFactory
|
||||
ARG 12 callback
|
||||
ARG 13 tooltipFactory
|
||||
ARG 14 optionTextOmitted
|
||||
METHOD method_32603 getValue ()Ljava/lang/Object;
|
||||
METHOD method_32604 (Ljava/lang/Boolean;)Lnet/minecraft/class_2561;
|
||||
ARG 0 value
|
||||
METHOD method_32605 setValue (Ljava/lang/Object;)V
|
||||
ARG 1 value
|
||||
METHOD method_32606 builder (Ljava/util/function/Function;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Creates a new builder for a cycling button widget.
|
||||
ARG 0 valueToText
|
||||
METHOD method_32607 onOffBuilder (Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Creates a builder for a cycling button widget that only has {@linkplain Boolean#TRUE}
|
||||
COMMENT and {@linkplain Boolean#FALSE} values. It displays
|
||||
COMMENT {@code on} for {@code true} and {@code off} for {@code false}.
|
||||
COMMENT Its current initial value is {@code true}.
|
||||
ARG 0 on
|
||||
ARG 1 off
|
||||
METHOD method_32608 (Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/lang/Boolean;)Lnet/minecraft/class_2561;
|
||||
ARG 2 value
|
||||
METHOD method_32609 (Ljava/lang/Object;)V
|
||||
METHOD method_32609 internalSetValue (Ljava/lang/Object;)V
|
||||
ARG 1 value
|
||||
METHOD method_32610 getGenericTextForValue (Ljava/lang/Object;)Lnet/minecraft/class_5250;
|
||||
METHOD method_32610 composeGenericOptionText (Ljava/lang/Object;)Lnet/minecraft/class_5250;
|
||||
ARG 1 value
|
||||
METHOD method_32611 getGenericNarrationMessage ()Lnet/minecraft/class_5250;
|
||||
COMMENT Returns a generic narration message for this button.
|
||||
COMMENT
|
||||
COMMENT <p>If the button omits the option text in rendering, such as showing only
|
||||
COMMENT "Value", this narration message will still read out the option like
|
||||
COMMENT "Option: Value".
|
||||
METHOD method_32612 cycle (I)V
|
||||
ARG 1 amount
|
||||
METHOD method_32613 onOffBuilder (Z)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Creates a builder for a cycling button widget that only has {@linkplain Boolean#TRUE}
|
||||
COMMENT and {@linkplain Boolean#FALSE} values. It displays
|
||||
COMMENT {@link net.minecraft.client.gui.screen.ScreenTexts#ON} for {@code true} and
|
||||
COMMENT {@link net.minecraft.client.gui.screen.ScreenTexts#OFF} for {@code false}.
|
||||
COMMENT Its current initial value is set to {@code initialValue}.
|
||||
ARG 0 initialValue
|
||||
METHOD method_32614 onOffBuilder ()Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Creates a builder for a cycling button widget that only has {@linkplain Boolean#TRUE}
|
||||
COMMENT and {@linkplain Boolean#FALSE} values. It displays
|
||||
COMMENT {@link net.minecraft.client.gui.screen.ScreenTexts#ON} for {@code true} and
|
||||
COMMENT {@link net.minecraft.client.gui.screen.ScreenTexts#OFF} for {@code false}.
|
||||
COMMENT Its current initial value is {@code true}.
|
||||
CLASS class_5677 Builder
|
||||
COMMENT A builder to easily create cycling button widgets.
|
||||
COMMENT
|
||||
COMMENT Each builder must have at least one of its {@code values} methods called
|
||||
COMMENT with at least one default (non-alternative) value in the list before
|
||||
COMMENT building.
|
||||
COMMENT
|
||||
COMMENT @see CyclingButtonWidget#builder(Function)
|
||||
FIELD field_27972 initialIndex I
|
||||
FIELD field_27973 value Ljava/lang/Object;
|
||||
FIELD field_27974 valueToText Ljava/util/function/Function;
|
||||
FIELD field_27975 tooltipFactory Lnet/minecraft/class_5676$class_5679;
|
||||
FIELD field_27976 narrationMessageFactory Ljava/util/function/Function;
|
||||
FIELD field_27977 values Lnet/minecraft/class_5676$class_5680;
|
||||
FIELD field_27978 optionTextOmitted Z
|
||||
METHOD <init> (Ljava/util/function/Function;)V
|
||||
COMMENT Creates a builder.
|
||||
COMMENT
|
||||
COMMENT @see CyclingButtonWidget#builder(Function)
|
||||
ARG 1 valueToText
|
||||
METHOD method_32616 omitKeyText ()Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Makes the built button omit the option and only display the current value
|
||||
COMMENT for its text, such as showing "Jump Mode" than "Mode: Jump Mode".
|
||||
METHOD method_32617 build (IIIILnet/minecraft/class_2561;Lnet/minecraft/class_5676$class_5678;)Lnet/minecraft/class_5676;
|
||||
METHOD method_32619 value (Ljava/lang/Object;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Builds a cycling button widget.
|
||||
COMMENT
|
||||
COMMENT @throws IllegalStateException if no {@code values} call is made, or the
|
||||
COMMENT {@code values} has no default values available
|
||||
ARG 1 x
|
||||
ARG 2 y
|
||||
ARG 3 width
|
||||
ARG 4 height
|
||||
ARG 5 optionText
|
||||
ARG 6 callback
|
||||
METHOD method_32618 tooltip (Lnet/minecraft/class_5676$class_5679;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Sets the tooltip factory that provides tooltips for any of the values.
|
||||
COMMENT
|
||||
COMMENT <p>If this is not called, the values simply won't have tooltips.
|
||||
ARG 1 tooltipFactory
|
||||
METHOD method_32619 initially (Ljava/lang/Object;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Sets the initial value of this button widget.
|
||||
COMMENT
|
||||
COMMENT <p>This is not effective if {@code value} is not in the default
|
||||
COMMENT values (i.e. excluding alternative values).
|
||||
COMMENT
|
||||
COMMENT <p>If this is not called, the initial value defaults to the first
|
||||
COMMENT value in the values list supplied.
|
||||
ARG 1 value
|
||||
METHOD method_32620 values (Ljava/util/List;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Sets the option values for this button.
|
||||
ARG 1 values
|
||||
METHOD method_32621 values (Ljava/util/List;Ljava/util/List;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Sets the option values for this button.
|
||||
COMMENT
|
||||
COMMENT <p>When the user presses the ALT key, the {@code alternatives} values
|
||||
COMMENT will be iterated; otherwise the {@code defaults} values will be iterated
|
||||
COMMENT when clicking the built button.
|
||||
ARG 1 defaults
|
||||
ARG 2 alternatives
|
||||
METHOD method_32622 values (Ljava/util/function/BooleanSupplier;Ljava/util/List;Ljava/util/List;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Sets the option values for this button.
|
||||
COMMENT
|
||||
COMMENT <p>When {@code alternativeToggle} {@linkplain BooleanSupplier#getAsBoolean()
|
||||
COMMENT getAsBoolean} returns {@code true}, the {@code alternatives} values
|
||||
COMMENT will be iterated; otherwise the {@code defaults} values will be iterated
|
||||
COMMENT when clicking the built button.
|
||||
ARG 1 alternativeToggle
|
||||
ARG 2 defaults
|
||||
ARG 3 alternatives
|
||||
METHOD method_32623 narration (Ljava/util/function/Function;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Overrides the narration message of the button to build.
|
||||
COMMENT
|
||||
COMMENT <p>If this is not called, the button will use
|
||||
COMMENT {@link CyclingButtonWidget#getGenericNarrationMessage()} for narration
|
||||
COMMENT messages.
|
||||
ARG 1 narrationMessageFactory
|
||||
METHOD method_32624 values ([Ljava/lang/Object;)Lnet/minecraft/class_5676$class_5677;
|
||||
COMMENT Sets the option values for this button.
|
||||
ARG 1 values
|
||||
METHOD method_32625 (Ljava/lang/Object;)Ljava/util/List;
|
||||
ARG 0 value
|
||||
CLASS class_5678
|
||||
CLASS class_5678 UpdateCallback
|
||||
METHOD onValueChange (Lnet/minecraft/class_5676;Ljava/lang/Object;)V
|
||||
ARG 1 button
|
||||
ARG 2 value
|
||||
CLASS class_5679 TooltipFactory
|
||||
CLASS class_5680 Values
|
||||
METHOD method_32626 getCurrent ()Ljava/util/List;
|
||||
METHOD method_32627 of (Ljava/util/List;)Lnet/minecraft/class_5676$class_5680;
|
||||
ARG 0 values
|
||||
METHOD method_32628 of (Ljava/util/function/BooleanSupplier;Ljava/util/List;Ljava/util/List;)Lnet/minecraft/class_5676$class_5680;
|
||||
ARG 0 alternativeToggle
|
||||
ARG 1 defaults
|
||||
ARG 2 alternatives
|
||||
METHOD method_32629 getDefaults ()Ljava/util/List;
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
CLASS net/minecraft/class_4064 net/minecraft/client/option/CyclingOption
|
||||
FIELD field_18169 setter Lnet/minecraft/class_4064$class_5675;
|
||||
FIELD field_27953 getter Ljava/util/function/Function;
|
||||
FIELD field_27954 buttonBuilderFactory Ljava/util/function/Supplier;
|
||||
FIELD field_27955 tooltips Ljava/util/function/Function;
|
||||
METHOD <init> (Ljava/lang/String;Ljava/util/function/Function;Lnet/minecraft/class_4064$class_5675;Ljava/util/function/Supplier;)V
|
||||
ARG 1 key
|
||||
ARG 2 getter
|
||||
ARG 3 setter
|
||||
ARG 4 buttonBuilderFactory
|
||||
METHOD method_32518 (Lnet/minecraft/class_310;)Lnet/minecraft/class_5676$class_5679;
|
||||
ARG 0 client
|
||||
METHOD method_32519 (Lnet/minecraft/class_315;Lnet/minecraft/class_5676;Ljava/lang/Object;)V
|
||||
|
@ -14,6 +17,10 @@ CLASS net/minecraft/class_4064 net/minecraft/client/option/CyclingOption
|
|||
ARG 0 value
|
||||
METHOD method_32521 create (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/function/BooleanSupplier;Ljava/util/function/Function;Ljava/util/function/Function;Lnet/minecraft/class_4064$class_5675;)Lnet/minecraft/class_4064;
|
||||
ARG 0 key
|
||||
ARG 1 defaults
|
||||
ARG 2 alternatives
|
||||
ARG 3 alternativeToggle
|
||||
ARG 4 valueToText
|
||||
ARG 5 getter
|
||||
ARG 6 setter
|
||||
METHOD method_32522 create (Ljava/lang/String;Ljava/util/function/Function;Lnet/minecraft/class_4064$class_5675;)Lnet/minecraft/class_4064;
|
||||
|
@ -22,25 +29,34 @@ CLASS net/minecraft/class_4064 net/minecraft/client/option/CyclingOption
|
|||
ARG 2 setter
|
||||
METHOD method_32523 create (Ljava/lang/String;Ljava/util/function/Supplier;Ljava/util/function/Function;Ljava/util/function/Function;Lnet/minecraft/class_4064$class_5675;)Lnet/minecraft/class_4064;
|
||||
ARG 0 key
|
||||
ARG 1 valuesSupplier
|
||||
ARG 2 valueToText
|
||||
ARG 3 getter
|
||||
ARG 4 setter
|
||||
METHOD method_32524 create (Ljava/lang/String;Lnet/minecraft/class_2561;Ljava/util/function/Function;Lnet/minecraft/class_4064$class_5675;)Lnet/minecraft/class_4064;
|
||||
ARG 0 key
|
||||
ARG 1 tooltip
|
||||
ARG 2 getter
|
||||
ARG 3 setter
|
||||
METHOD method_32525 create (Ljava/lang/String;Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Ljava/util/function/Function;Lnet/minecraft/class_4064$class_5675;)Lnet/minecraft/class_4064;
|
||||
ARG 0 key
|
||||
ARG 1 on
|
||||
ARG 2 off
|
||||
ARG 3 getter
|
||||
ARG 4 setter
|
||||
METHOD method_32526 create (Ljava/lang/String;[Ljava/lang/Object;Ljava/util/function/Function;Ljava/util/function/Function;Lnet/minecraft/class_4064$class_5675;)Lnet/minecraft/class_4064;
|
||||
ARG 0 key
|
||||
ARG 1 values
|
||||
ARG 2 valueToText
|
||||
ARG 3 getter
|
||||
ARG 4 setter
|
||||
METHOD method_32527 (Ljava/util/List;Ljava/lang/Boolean;)Ljava/util/List;
|
||||
ARG 1 value
|
||||
METHOD method_32528 tooltip (Ljava/util/function/Function;)Lnet/minecraft/class_4064;
|
||||
ARG 1 tooltips
|
||||
METHOD method_32532 (Lnet/minecraft/class_2561;Lnet/minecraft/class_310;)Lnet/minecraft/class_5676$class_5679;
|
||||
ARG 1 client
|
||||
CLASS class_5675
|
||||
CLASS class_5675 Setter
|
||||
METHOD accept (Lnet/minecraft/class_315;Lnet/minecraft/class_316;Ljava/lang/Object;)V
|
||||
ARG 1 gameOptions
|
||||
ARG 2 option
|
||||
|
|
Loading…
Reference in New Issue