All Implemented Interfaces:
TParentElement, ITooltipProvider, IEnableStateProvider, IEnableStateProviderSetter, ITextProvider, ITextProviderSetter
Direct Known Subclasses:
FileListItem, TCheckboxWidget, TitleBar.TitleBarSquareButton, TMenuPanelButton, TSelectWidget, TSliderWidget

public class TButtonWidget extends TClickableWidget implements ITextProviderSetter
A TButtonWidget is a TClickableWidget that looks and behaves like a vanilla button.
  • Field Details

    • text

      @Nullable protected @Nullable net.minecraft.text.Text text
    • onClick

      @Nullable protected @Nullable Consumer<TButtonWidget> onClick
    • icon

      @Nullable protected @Nullable UITexture icon
    • iconColor

      protected final float[] iconColor
  • Constructor Details

    • TButtonWidget

      public TButtonWidget(int x, int y, int width, int height)
    • TButtonWidget

      public TButtonWidget(int x, int y, int width, int height, net.minecraft.text.Text text)
    • TButtonWidget

      public TButtonWidget(int x, int y, int width, int height, net.minecraft.text.Text text, Consumer<TButtonWidget> onClick)
  • Method Details