Package net.minecraft.client.gui.widget
Class ButtonWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.widget.AbstractPressableButtonWidget
net.minecraft.client.gui.widget.ButtonWidget
- Direct Known Subclasses:
LockButtonWidget
,MerchantScreen.WidgetButtonPage
,PageTurnWidget
,RealmsMainScreen.CloseButton
,RealmsMainScreen.NewsButton
,RealmsMainScreen.PendingInvitesButton
,RealmsMainScreen.ShowPopupButton
,RealmsResetWorldScreen.FrameButton
,RealmsWorldSlotButton
,TexturedButtonWidget
@Environment(CLIENT) public class ButtonWidget extends AbstractPressableButtonWidget
- Mappings:
Namespace Name official dru
intermediary net/minecraft/class_4185
named net/minecraft/client/gui/widget/ButtonWidget
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ButtonWidget.PressAction
static interface
ButtonWidget.TooltipSupplier
-
Field Summary
Fields Modifier and Type Field Description static ButtonWidget.TooltipSupplier
EMPTY
protected ButtonWidget.PressAction
onPress
protected ButtonWidget.TooltipSupplier
tooltipSupplier
Fields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
Constructors Constructor Description ButtonWidget(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 Type Method Description 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.AbstractPressableButtonWidget
keyPressed, onClick
Methods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, setAlpha, setFocused, setMessage, setWidth
Methods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, 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
Ldru;s:Ldru$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
- Mappings:
Namespace Name Mixin selector official t
Ldru;t:Ldru$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 u
Ldru;u:Ldru$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>
Ldru;<init>(IIIILoi;Ldru$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>
Ldru;<init>(IIIILoi;Ldru$a;Ldru$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 classAbstractPressableButtonWidget
- Mappings:
Namespace Name Mixin selector official b
Ldro;b()V
intermediary method_25306
Lnet/minecraft/class_4264;method_25306()V
named onPress
Lnet/minecraft/client/gui/widget/AbstractPressableButtonWidget;onPress()V
-
renderButton
- Overrides:
renderButton
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official b
Ldrs;b(Ldlr;IIF)V
intermediary method_25359
Lnet/minecraft/class_339;method_25359(Lnet/minecraft/class_4587;IIF)V
named renderButton
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;renderButton(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
-
renderToolTip
- Overrides:
renderToolTip
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official a
Ldrs;a(Ldlr;II)V
intermediary method_25352
Lnet/minecraft/class_339;method_25352(Lnet/minecraft/class_4587;II)V
named renderToolTip
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;renderToolTip(Lnet/minecraft/client/util/math/MatrixStack;II)V
-