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
,Widget
,NarratableEntry
,NarrationSupplier
- Direct Known Subclasses:
MultiLineEditBox
public abstract class AbstractScrollWidget
extends AbstractWidget
implements Widget, 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
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, 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
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_) void
renderButton
(PoseStack p_239793_, int p_239794_, int p_239795_, float p_239796_) protected abstract void
renderContents
(PoseStack p_239198_, int p_239199_, int p_239200_, float p_239201_) protected void
renderDecorations
(PoseStack p_239981_) private void
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
changeFocus, clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getYImage, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, narrationPriority, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBg, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessage
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, 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
changeFocus, charTyped, isMouseOver, keyPressed, keyReleased, mouseMoved
Methods inherited from interface net.minecraft.client.gui.narration.NarrationSupplier
updateNarration
-
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
-
renderButton
- Overrides:
renderButton
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
private void 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_)
-