Class AbstractScrollWidget
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollWidget
- All Implemented Interfaces:
GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
,IAbstractWidgetExtension
- Direct Known Subclasses:
FittingMultiLineTextWidget
,MultiLineEditBox
,TelemetryEventWidget
public abstract class AbstractScrollWidget
extends AbstractWidget
implements Renderable, GuiEventListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final WidgetSprites
private static final int
private static final int
private double
private static final ResourceLocation
private boolean
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
ConstructorDescriptionAbstractScrollWidget
(int p_240025_, int p_240026_, int p_240027_, int p_240028_, Component p_240029_) -
Method Summary
Modifier and TypeMethodDescriptionprivate int
protected abstract int
protected int
private int
protected int
boolean
keyPressed
(int p_276060_, int p_276046_, int p_276030_) boolean
mouseClicked
(double p_240170_, double p_240171_, int p_240172_) boolean
mouseDragged
(double p_239639_, double p_239640_, int p_239641_, double p_239642_, double p_239643_) boolean
mouseReleased
(double p_239063_, double p_239064_, int p_239065_) boolean
mouseScrolled
(double p_239308_, double p_239309_, double p_239310_, double p_294677_) protected void
renderBackground
(GuiGraphics p_282207_) protected void
renderBorder
(GuiGraphics p_289776_, int p_289792_, int p_289795_, int p_289775_, int p_289762_) protected abstract void
renderContents
(GuiGraphics p_282975_, int p_239199_, int p_239200_, float p_239201_) protected void
renderDecorations
(GuiGraphics p_283178_) private void
renderScrollBar
(GuiGraphics p_282305_) void
renderWidget
(GuiGraphics p_282213_, int p_282468_, int p_282209_, float p_283300_) protected double
protected boolean
int
protected abstract double
protected void
setScrollAmount
(double p_240207_) protected int
protected boolean
withinContentAreaPoint
(double p_239607_, double p_239608_) protected boolean
withinContentAreaTopBottom
(int p_239943_, int p_239944_) 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, narrationPriority, nextFocusPath, onClick, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, 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, getRectangle, isFocused, isMouseOver, keyReleased, mouseMoved, nextFocusPath, setFocused
Methods inherited from interface net.neoforged.neoforge.client.extensions.IAbstractWidgetExtension
onClick
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
Methods inherited from interface net.minecraft.client.gui.components.Renderable
render
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
BACKGROUND_SPRITES
-
SCROLLER_SPRITE
-
INNER_PADDING
private static final int INNER_PADDING- See Also:
-
SCROLL_BAR_WIDTH
private static final int SCROLL_BAR_WIDTH- See Also:
-
scrollAmount
private double scrollAmount -
scrolling
private boolean scrolling
-
-
Constructor Details
-
AbstractScrollWidget
public AbstractScrollWidget(int p_240025_, int p_240026_, int p_240027_, int p_240028_, Component p_240029_)
-
-
Method Details
-
mouseClicked
public boolean mouseClicked(double p_240170_, double p_240171_, int p_240172_) - Specified by:
mouseClicked
in interfaceGuiEventListener
- Overrides:
mouseClicked
in classAbstractWidget
-
mouseReleased
public boolean mouseReleased(double p_239063_, double p_239064_, int p_239065_) - Specified by:
mouseReleased
in interfaceGuiEventListener
- Overrides:
mouseReleased
in classAbstractWidget
-
mouseDragged
public boolean mouseDragged(double p_239639_, double p_239640_, int p_239641_, double p_239642_, double p_239643_) - Specified by:
mouseDragged
in interfaceGuiEventListener
- Overrides:
mouseDragged
in classAbstractWidget
-
mouseScrolled
public boolean mouseScrolled(double p_239308_, double p_239309_, double p_239310_, double p_294677_) - Specified by:
mouseScrolled
in interfaceGuiEventListener
-
keyPressed
public boolean keyPressed(int p_276060_, int p_276046_, int p_276030_) - Specified by:
keyPressed
in interfaceGuiEventListener
-
renderWidget
- Specified by:
renderWidget
in classAbstractWidget
-
getScrollBarHeight
private int getScrollBarHeight() -
renderDecorations
-
innerPadding
protected int innerPadding() -
totalInnerPadding
protected int totalInnerPadding() -
scrollAmount
protected double scrollAmount() -
setScrollAmount
protected void setScrollAmount(double p_240207_) -
getMaxScrollAmount
protected int getMaxScrollAmount() -
getContentHeight
private int getContentHeight() -
renderBackground
-
renderBorder
protected void renderBorder(GuiGraphics p_289776_, int p_289792_, int p_289795_, int p_289775_, int p_289762_) -
renderScrollBar
-
withinContentAreaTopBottom
protected boolean withinContentAreaTopBottom(int p_239943_, int p_239944_) -
withinContentAreaPoint
protected boolean withinContentAreaPoint(double p_239607_, double p_239608_) -
scrollbarVisible
protected boolean scrollbarVisible() -
scrollbarWidth
public int scrollbarWidth() -
getInnerHeight
protected abstract int getInnerHeight() -
scrollRate
protected abstract double scrollRate() -
renderContents
protected abstract void renderContents(GuiGraphics p_282975_, int p_239199_, int p_239200_, float p_239201_)
-