Class AbstractButton
java.lang.Object
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 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
(GuiGraphics p_283366_, Font p_283054_, int p_281656_) protected void
renderWidget
(GuiGraphics p_281670_, int p_282682_, int p_281714_, float p_282542_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createNarrationMessage, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getTooltip, 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 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_)
-