Package net.minecraft.client.gui.widget
Class ButtonWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.ClickableWidget
net.minecraft.client.gui.widget.PressableWidget
net.minecraft.client.gui.widget.ButtonWidget
- All Implemented Interfaces:
Drawable
,Element
,Narratable
,Selectable
- Direct Known Subclasses:
LockButtonWidget
,MerchantScreen.WidgetButtonPage
,PageTurnWidget
,PressableTextWidget
,RealmsMainScreen.CloseButton
,RealmsMainScreen.NewsButton
,RealmsMainScreen.PendingInvitesButton
,RealmsResetWorldScreen.FrameButton
,RealmsWorldSlotButton
,TexturedButtonWidget
- Mappings:
Namespace Name official ehp
intermediary net/minecraft/class_4185
named net/minecraft/client/gui/widget/ButtonWidget
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ButtonWidget.TooltipSupplier
static final int
static final int
static final int
protected final ButtonWidget.PressAction
protected final ButtonWidget.TooltipSupplier
Fields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, visible, WIDGETS_TEXTURE, width, x, y
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Fields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL
-
Constructor Summary
ConstructorDescriptionButtonWidget
(int x, int y, int width, int height, Text message, ButtonWidget.PressAction onPress) ButtonWidget
(int x, int y, int width, int height, Text message, ButtonWidget.PressAction onPress, ButtonWidget.TooltipSupplier tooltipSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendNarrations
(NarrationMessageBuilder builder) void
onPress()
void
renderButton
(MatrixStack matrices, int mouseX, int mouseY, float delta) void
renderTooltip
(MatrixStack matrices, int mouseX, int mouseY) Methods inherited from class net.minecraft.client.gui.widget.PressableWidget
keyPressed, onClick
Methods inherited from class net.minecraft.client.gui.widget.ClickableWidget
appendDefaultNarrations, changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getType, getWidth, getYImage, isFocused, isHovered, isMouseOver, isNarratable, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBackground, setAlpha, setFocused, setMessage, setWidth
Methods inherited from class net.minecraft.client.gui.DrawableHelper
disableScissor, drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithOutline, drawWithShadow, enableScissor, fill, fillGradient, fillGradient, fillGradient, getZOffset, setZOffset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.Element
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
EMPTY
- Mappings:
Namespace Name Mixin selector official s
Lehp;s:Lehp$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;
-
field_39499
public static final int field_39499- See Also:
- Mappings:
Namespace Name Mixin selector official t
Lehp;t:I
intermediary field_39499
Lnet/minecraft/class_4185;field_39499:I
named field_39499
Lnet/minecraft/client/gui/widget/ButtonWidget;field_39499:I
-
field_39500
public static final int field_39500- See Also:
- Mappings:
Namespace Name Mixin selector official u
Lehp;u:I
intermediary field_39500
Lnet/minecraft/class_4185;field_39500:I
named field_39500
Lnet/minecraft/client/gui/widget/ButtonWidget;field_39500:I
-
field_39501
public static final int field_39501- See Also:
- Mappings:
Namespace Name Mixin selector official v
Lehp;v:I
intermediary field_39501
Lnet/minecraft/class_4185;field_39501:I
named field_39501
Lnet/minecraft/client/gui/widget/ButtonWidget;field_39501:I
-
onPress
- Mappings:
Namespace Name Mixin selector official w
Lehp;w:Lehp$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
- Mappings:
Namespace Name Mixin selector official x
Lehp;x:Lehp$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>
Lehp;<init>(IIIILrq;Lehp$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>
Lehp;<init>(IIIILrq;Lehp$a;Lehp$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 classPressableWidget
- Mappings:
Namespace Name Mixin selector official d
Lehi;d()V
intermediary method_25306
Lnet/minecraft/class_4264;method_25306()V
named onPress
Lnet/minecraft/client/gui/widget/PressableWidget;onPress()V
-
renderButton
- Overrides:
renderButton
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official b
Lehn;b(Leaq;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
- Overrides:
renderTooltip
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Lehn;a(Leaq;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
- Mappings:
Namespace Name Mixin selector official a
Lejw;a(Lejv;)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
-