Class ButtonWidget

All Implemented Interfaces:
Drawable, Element, Narratable, Selectable
Direct Known Subclasses:
LockButtonWidget, MerchantScreen.WidgetButtonPage, PageTurnWidget, PressableTextWidget, RealmsMainScreen.CloseButton, RealmsMainScreen.NewsButton, RealmsMainScreen.PendingInvitesButton, RealmsMainScreen.ShowPopupButton, RealmsResetWorldScreen.FrameButton, RealmsWorldSlotButton, TexturedButtonWidget

@Environment(CLIENT) public class ButtonWidget extends PressableWidget
Mappings:
Namespace Name
official eae
intermediary net/minecraft/class_4185
named net/minecraft/client/gui/widget/ButtonWidget
  • Field Details

    • EMPTY

      public static final ButtonWidget.TooltipSupplier EMPTY
      Mappings:
      Namespace Name Mixin selector
      official r Leae;r:Leae$b;
      intermediary field_25035 Lnet/minecraft/class_4185;field_25035:Lnet/minecraft/class_4185$class_5316;
      named EMPTY Lnet/minecraft/client/gui/widget/ButtonWidget;EMPTY:Lnet/minecraft/client/gui/widget/ButtonWidget$TooltipSupplier;
    • onPress

      protected final ButtonWidget.PressAction onPress
      Mappings:
      Namespace Name Mixin selector
      official s Leae;s:Leae$a;
      intermediary field_22767 Lnet/minecraft/class_4185;field_22767:Lnet/minecraft/class_4185$class_4241;
      named onPress Lnet/minecraft/client/gui/widget/ButtonWidget;onPress:Lnet/minecraft/client/gui/widget/ButtonWidget$PressAction;
    • tooltipSupplier

      protected final ButtonWidget.TooltipSupplier tooltipSupplier
      Mappings:
      Namespace Name Mixin selector
      official t Leae;t:Leae$b;
      intermediary field_25036 Lnet/minecraft/class_4185;field_25036:Lnet/minecraft/class_4185$class_5316;
      named tooltipSupplier Lnet/minecraft/client/gui/widget/ButtonWidget;tooltipSupplier:Lnet/minecraft/client/gui/widget/ButtonWidget$TooltipSupplier;
  • Constructor Details

    • ButtonWidget

      public ButtonWidget(int x, int y, int width, int height, Text message, ButtonWidget.PressAction onPress)
      Mappings:
      Namespace Name Mixin selector
      official <init> Leae;<init>(IIIILqk;Leae$a;)V
      intermediary <init> Lnet/minecraft/class_4185;<init>(IIIILnet/minecraft/class_2561;Lnet/minecraft/class_4185$class_4241;)V
      named <init> Lnet/minecraft/client/gui/widget/ButtonWidget;<init>(IIIILnet/minecraft/text/Text;Lnet/minecraft/client/gui/widget/ButtonWidget$PressAction;)V
    • ButtonWidget

      public ButtonWidget(int x, int y, int width, int height, Text message, ButtonWidget.PressAction onPress, ButtonWidget.TooltipSupplier tooltipSupplier)
      Mappings:
      Namespace Name Mixin selector
      official <init> Leae;<init>(IIIILqk;Leae$a;Leae$b;)V
      intermediary <init> Lnet/minecraft/class_4185;<init>(IIIILnet/minecraft/class_2561;Lnet/minecraft/class_4185$class_4241;Lnet/minecraft/class_4185$class_5316;)V
      named <init> Lnet/minecraft/client/gui/widget/ButtonWidget;<init>(IIIILnet/minecraft/text/Text;Lnet/minecraft/client/gui/widget/ButtonWidget$PressAction;Lnet/minecraft/client/gui/widget/ButtonWidget$TooltipSupplier;)V
  • Method Details

    • onPress

      public void onPress()
      Specified by:
      onPress in class PressableWidget
      Mappings:
      Namespace Name Mixin selector
      official c Ldzy;c()V
      intermediary method_25306 Lnet/minecraft/class_4264;method_25306()V
      named onPress Lnet/minecraft/client/gui/widget/PressableWidget;onPress()V
    • renderButton

      public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)
      Overrides:
      renderButton in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official b Leac;b(Ldtm;IIF)V
      intermediary method_25359 Lnet/minecraft/class_339;method_25359(Lnet/minecraft/class_4587;IIF)V
      named renderButton Lnet/minecraft/client/gui/widget/ClickableWidget;renderButton(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
    • renderTooltip

      public void renderTooltip(MatrixStack matrices, int mouseX, int mouseY)
      Overrides:
      renderTooltip in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official a Leac;a(Ldtm;II)V
      intermediary method_25352 Lnet/minecraft/class_339;method_25352(Lnet/minecraft/class_4587;II)V
      named renderTooltip Lnet/minecraft/client/gui/widget/ClickableWidget;renderTooltip(Lnet/minecraft/client/util/math/MatrixStack;II)V
    • appendNarrations

      public void appendNarrations(NarrationMessageBuilder builder)
      Mappings:
      Namespace Name Mixin selector
      official a Lecj;a(Leci;)V
      intermediary method_37020 Lnet/minecraft/class_6383;method_37020(Lnet/minecraft/class_6382;)V
      named appendNarrations Lnet/minecraft/client/gui/Narratable;appendNarrations(Lnet/minecraft/client/gui/screen/narration/NarrationMessageBuilder;)V