Class Button
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.widget.Widget
-
- net.minecraft.client.gui.widget.button.AbstractButton
-
- net.minecraft.client.gui.widget.button.Button
-
- All Implemented Interfaces:
IGuiEventListener
,IRenderable
- Direct Known Subclasses:
ChangePageButton
,ExtendedButton
,ImageButton
,LockIconButton
,MerchantScreen.TradeButton
,OptionButton
,RealmsMainScreen.CloseButton
,RealmsMainScreen.InfoButton
,RealmsMainScreen.NewsButton
,RealmsMainScreen.PendingInvitesButton
,RealmsResetWorldScreen.TexturedButton
,RealmsServerSlotButton
public class Button extends AbstractButton
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Button.IPressable
static interface
Button.ITooltip
-
Field Summary
Fields Modifier and Type Field Description static Button.ITooltip
NO_TOOLTIP
protected Button.IPressable
onPress
protected Button.ITooltip
onTooltip
-
Fields inherited from class net.minecraft.client.gui.widget.Widget
active, alpha, height, isHovered, nextNarration, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description Button(int p_i232255_1_, int p_i232255_2_, int p_i232255_3_, int p_i232255_4_, ITextComponent p_i232255_5_, Button.IPressable p_i232255_6_)
Button(int p_i232256_1_, int p_i232256_2_, int p_i232256_3_, int p_i232256_4_, ITextComponent p_i232256_5_, Button.IPressable p_i232256_6_, Button.ITooltip p_i232256_7_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onPress()
void
renderButton(MatrixStack p_230431_1_, int p_230431_2_, int p_230431_3_, float p_230431_4_)
void
renderToolTip(MatrixStack p_230443_1_, int p_230443_2_, int p_230443_3_)
-
Methods inherited from class net.minecraft.client.gui.widget.button.AbstractButton
keyPressed, onClick
-
Methods inherited from class net.minecraft.client.gui.widget.Widget
changeFocus, clearFGColor, clicked, createNarrationMessage, getFGColor, getHeight, getMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
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.IGuiEventListener
charTyped, keyReleased, mouseMoved, mouseScrolled
-
-
-
-
Field Detail
-
NO_TOOLTIP
public static final Button.ITooltip NO_TOOLTIP
-
onPress
protected final Button.IPressable onPress
-
onTooltip
protected final Button.ITooltip onTooltip
-
-
Constructor Detail
-
Button
public Button(int p_i232255_1_, int p_i232255_2_, int p_i232255_3_, int p_i232255_4_, ITextComponent p_i232255_5_, Button.IPressable p_i232255_6_)
-
Button
public Button(int p_i232256_1_, int p_i232256_2_, int p_i232256_3_, int p_i232256_4_, ITextComponent p_i232256_5_, Button.IPressable p_i232256_6_, Button.ITooltip p_i232256_7_)
-
-
Method Detail
-
onPress
public void onPress()
- Specified by:
onPress
in classAbstractButton
-
renderButton
public void renderButton(MatrixStack p_230431_1_, int p_230431_2_, int p_230431_3_, float p_230431_4_)
- Overrides:
renderButton
in classWidget
-
renderToolTip
public void renderToolTip(MatrixStack p_230443_1_, int p_230443_2_, int p_230443_3_)
- Overrides:
renderToolTip
in classWidget
-
-