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
,IAbstractWidgetExtension
- 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
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, 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 TypeMethodDescriptionboolean
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, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setFocused, setHeight, setMessage, setRectangle, setSize, 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.neoforged.neoforge.client.extensions.IAbstractWidgetExtension
onClick
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
Field Details
-
TEXT_MARGIN
protected static final int TEXT_MARGIN- See Also:
-
SPRITES
-
-
Constructor Details
-
AbstractButton
-
-
Method Details
-
onPress
public abstract void onPress() -
renderWidget
- Specified by:
renderWidget
in classAbstractWidget
-
renderString
-
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_)
-