Class AbstractButton
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
- All Implemented Interfaces:
GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
- Direct Known Subclasses:
BeaconScreen.BeaconScreenButton
,Button
,Checkbox
,CycleButton
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
ACCESSIBILITY_TEXTURE, active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, LIGHT_DIRT_BACKGROUND, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionAbstractButton
(int p_93365_, int p_93366_, int p_93367_, int p_93368_, Component p_93369_) -
Method Summary
Modifier and TypeMethodDescriptionprivate int
boolean
keyPressed
(int p_93374_, int p_93375_, int p_93376_) void
onClick
(double p_93371_, double p_93372_) abstract void
onPress()
void
renderString
(PoseStack p_275258_, Font p_275290_, int p_275734_) void
renderWidget
(PoseStack p_275468_, int p_275505_, int p_275674_, float p_275696_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createNarrationMessage, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderTexture, setAlpha, setFGColor, setFocused, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, updateWidgetNarration, visitWidgets, wrapDefaultNarrationMessage
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blit, blitNineSliced, blitNineSliced, blitNineSliced, blitOutlineBlack, blitRepeating, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient, hLine, renderOutline, 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, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
Field Details
-
TEXTURE_Y_OFFSET
protected static final int TEXTURE_Y_OFFSET- See Also:
-
TEXTURE_WIDTH
protected static final int TEXTURE_WIDTH- See Also:
-
TEXTURE_HEIGHT
protected static final int TEXTURE_HEIGHT- See Also:
-
TEXTURE_BORDER_X
protected static final int TEXTURE_BORDER_X- See Also:
-
TEXTURE_BORDER_Y
protected static final int TEXTURE_BORDER_Y- See Also:
-
TEXT_MARGIN
protected static final int TEXT_MARGIN- See Also:
-
-
Constructor Details
-
AbstractButton
-
-
Method Details
-
onPress
public abstract void onPress() -
renderWidget
- Specified by:
renderWidget
in classAbstractWidget
-
renderString
-
getTextureY
private int getTextureY() -
onClick
public void onClick(double p_93371_, double p_93372_) - Overrides:
onClick
in classAbstractWidget
-
keyPressed
public boolean keyPressed(int p_93374_, int p_93375_, int p_93376_)
-