Class AbstractScrollArea
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollArea
- All Implemented Interfaces:
GuiEventListener,Renderable,TabOrderedElement,LayoutElement,NarratableEntry,NarrationSupplier
- Direct Known Subclasses:
AbstractContainerWidget,AbstractTextAreaWidget
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doublestatic final intprivate static final ResourceLocationprivate static final ResourceLocationprivate booleanFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionAbstractScrollArea(int p_386878_, int p_387233_, int p_388234_, int p_386759_, Component p_388945_) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intprotected booleanisOverScrollbar(double pMouseX, double pMouseY) intbooleanmouseDragged(MouseButtonEvent p_447056_, double p_387876_, double p_387261_) booleanmouseScrolled(double p_388530_, double p_387300_, double p_388604_, double p_386550_) voidonRelease(MouseButtonEvent p_445716_) voidprotected voidrenderScrollbar(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) doubleprotected booleanprotected intprotected intprotected intprotected abstract doublevoidsetScrollAmount(double pScrollAmount) booleanupdateScrolling(MouseButtonEvent pEvent) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseReleased, narrationPriority, nextFocusPath, onClick, onDrag, playButtonClickSound, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, renderWidget, setAlpha, setFGColor, setFocused, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, updateWidgetNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyPressed, keyReleased, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
getNarratables
-
Field Details
-
SCROLLBAR_WIDTH
public static final int SCROLLBAR_WIDTH- See Also:
-
scrollAmount
private double scrollAmount -
SCROLLER_SPRITE
-
SCROLLER_BACKGROUND_SPRITE
-
scrolling
private boolean scrolling
-
-
Constructor Details
-
AbstractScrollArea
public AbstractScrollArea(int p_386878_, int p_387233_, int p_388234_, int p_386759_, Component p_388945_)
-
-
Method Details
-
mouseScrolled
public boolean mouseScrolled(double p_388530_, double p_387300_, double p_388604_, double p_386550_) -
mouseDragged
- Specified by:
mouseDraggedin interfaceGuiEventListener- Overrides:
mouseDraggedin classAbstractWidget
-
onRelease
- Overrides:
onReleasein classAbstractWidget
-
scrollAmount
public double scrollAmount() -
setScrollAmount
public void setScrollAmount(double pScrollAmount) -
updateScrolling
-
isOverScrollbar
protected boolean isOverScrollbar(double pMouseX, double pMouseY) -
refreshScrollAmount
public void refreshScrollAmount() -
maxScrollAmount
public int maxScrollAmount() -
scrollbarVisible
protected boolean scrollbarVisible() -
scrollerHeight
protected int scrollerHeight() -
scrollBarX
protected int scrollBarX() -
scrollBarY
protected int scrollBarY() -
renderScrollbar
-
contentHeight
protected abstract int contentHeight() -
scrollRate
protected abstract double scrollRate()
-