Class AbstractScrollWidget
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollWidget
- All Implemented Interfaces:
GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
- Direct Known Subclasses:
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 int
private static final int
private static final int
private static final int
private double
private boolean
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
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_) private void
renderBackground
(PoseStack p_240049_) protected abstract void
renderContents
(PoseStack p_239198_, int p_239199_, int p_239200_, float p_239201_) protected void
renderDecorations
(PoseStack p_239981_) private void
renderScrollBar
(PoseStack p_265033_) void
renderWidget
(PoseStack p_239793_, int p_239794_, int p_239795_, float p_239796_) protected double
protected abstract boolean
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, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, narrationPriority, nextFocusPath, onClick, 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, getRectangle, isFocused, isMouseOver, keyReleased, mouseMoved, nextFocusPath, setFocused
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
-
BORDER_COLOR_FOCUSED
private static final int BORDER_COLOR_FOCUSED- See Also:
-
BORDER_COLOR
private static final int BORDER_COLOR- See Also:
-
BACKGROUND_COLOR
private static final int BACKGROUND_COLOR- See Also:
-
INNER_PADDING
private static final int INNER_PADDING- 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_) - 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
-
renderScrollBar
-
withinContentAreaTopBottom
protected boolean withinContentAreaTopBottom(int p_239943_, int p_239944_) -
withinContentAreaPoint
protected boolean withinContentAreaPoint(double p_239607_, double p_239608_) -
getInnerHeight
protected abstract int getInnerHeight() -
scrollbarVisible
protected abstract boolean scrollbarVisible() -
scrollRate
protected abstract double scrollRate() -
renderContents
protected abstract void renderContents(PoseStack p_239198_, int p_239199_, int p_239200_, float p_239201_)
-