Class Button
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.Button
- All Implemented Interfaces:
GuiEventListener
,Widget
,NarratableEntry
,NarrationSupplier
- Direct Known Subclasses:
ExtendedButton
,ImageButton
,LockIconButton
,MerchantScreen.TradeOfferButton
,PageButton
,PlainTextButton
,RealmsMainScreen.CloseButton
,RealmsMainScreen.NewsButton
,RealmsMainScreen.PendingInvitesButton
,RealmsResetWorldScreen.FrameButton
,RealmsWorldSlotButton
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final Button.OnTooltip
protected final Button.OnPress
protected final Button.OnTooltip
static final int
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionButton
(int p_93721_, int p_93722_, int p_93723_, int p_93724_, Component p_93725_, Button.OnPress p_93726_) Button
(int p_93728_, int p_93729_, int p_93730_, int p_93731_, Component p_93732_, Button.OnPress p_93733_, Button.OnTooltip p_93734_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onPress()
void
renderButton
(PoseStack p_93746_, int p_93747_, int p_93748_, float p_93749_) void
renderToolTip
(PoseStack p_93736_, int p_93737_, int p_93738_) void
updateNarration
(NarrationElementOutput p_168838_) Methods inherited from class net.minecraft.client.gui.components.AbstractButton
keyPressed, onClick
Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
changeFocus, clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getYImage, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBg, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessage
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, 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.components.events.GuiEventListener
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
NO_TOOLTIP
-
SMALL_WIDTH
public static final int SMALL_WIDTH- See Also:
-
DEFAULT_WIDTH
public static final int DEFAULT_WIDTH- See Also:
-
DEFAULT_HEIGHT
public static final int DEFAULT_HEIGHT- See Also:
-
onPress
-
onTooltip
-
-
Constructor Details
-
Button
public Button(int p_93721_, int p_93722_, int p_93723_, int p_93724_, Component p_93725_, Button.OnPress p_93726_) -
Button
public Button(int p_93728_, int p_93729_, int p_93730_, int p_93731_, Component p_93732_, Button.OnPress p_93733_, Button.OnTooltip p_93734_)
-
-
Method Details
-
onPress
public void onPress()- Specified by:
onPress
in classAbstractButton
-
renderButton
- Overrides:
renderButton
in classAbstractWidget
-
renderToolTip
- Overrides:
renderToolTip
in classAbstractWidget
-
updateNarration
-