Package net.minecraft.client.gui.widget
Class ScrollableWidget
java.lang.Object
net.minecraft.client.gui.widget.ClickableWidget
net.minecraft.client.gui.widget.ScrollableWidget
- All Implemented Interfaces:
- Drawable,- Element,- Narratable,- Navigable,- Selectable,- Widget
- Direct Known Subclasses:
- ContainerWidget,- ScrollableTextFieldWidget
A widget that can be focused and vertically scrolled.
- Mappings:
- Namespace - Name - named - net/minecraft/client/gui/widget/ScrollableWidget- intermediary - net/minecraft/class_7528- official - fom
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.gui.SelectableSelectable.SelectionType
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intprivate booleanprivate static final Identifierprivate static final Identifierprivate doubleFields inherited from class net.minecraft.client.gui.widget.ClickableWidgetactive, alpha, height, hovered, visible, widthFields inherited from interface net.minecraft.client.gui.ElementMAX_DOUBLE_CLICK_INTERVAL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancheckScrollbarDragged(double mouseX, double mouseY, int button) protected voiddrawScrollbar(DrawContext context) protected abstract intprotected abstract doubleintprotected intprotected intprotected intdoublebooleanmouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) Callback for when a mouse button drag event has been captured.booleanmouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) Callback for when a mouse button scroll event has been captured.voidonRelease(double mouseX, double mouseY) protected booleanReturns whether the contents overflow and needs a scrollbar.voidvoidsetScrollY(double scrollY) Methods inherited from class net.minecraft.client.gui.widget.ClickableWidgetappendClickableNarrations, appendDefaultNarrations, appendNarrations, drawScrollableText, drawScrollableText, drawScrollableText, forEachChild, getBottom, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getRight, getTooltip, getType, getWidth, getX, getY, isFocused, isHovered, isMouseOver, isNarratable, isSelected, isValidClickButton, mouseClicked, mouseReleased, onClick, onDrag, playClickSound, playDownSound, render, renderWidget, setAlpha, setDimensions, setDimensionsAndPosition, setFocused, setHeight, setMessage, setNavigationOrder, setTooltip, setTooltipDelay, setWidth, setX, setYMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.ElementcharTyped, getBorder, getFocusedPath, keyPressed, keyReleased, mouseMovedMethods inherited from interface net.minecraft.client.gui.SelectablegetNarratedPartsMethods inherited from interface net.minecraft.client.gui.widget.WidgetsetPosition
- 
Field Details- 
SCROLLBAR_WIDTHpublic static final int SCROLLBAR_WIDTH- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - SCROLLBAR_WIDTH- Lnet/minecraft/client/gui/widget/ScrollableWidget;SCROLLBAR_WIDTH:I- intermediary - field_55258- Lnet/minecraft/class_7528;field_55258:I- official - b- Lfom;b:I
 
- 
SCROLLER_TEXTURE- Mappings:
- Namespace - Name - Mixin selector - named - SCROLLER_TEXTURE- Lnet/minecraft/client/gui/widget/ScrollableWidget;SCROLLER_TEXTURE:Lnet/minecraft/util/Identifier;- intermediary - field_45906- Lnet/minecraft/class_7528;field_45906:Lnet/minecraft/class_2960;- official - c- Lfom;c:Lakv;
 
- 
SCROLLER_BACKGROUND_TEXTURE- Mappings:
- Namespace - Name - Mixin selector - named - SCROLLER_BACKGROUND_TEXTURE- Lnet/minecraft/client/gui/widget/ScrollableWidget;SCROLLER_BACKGROUND_TEXTURE:Lnet/minecraft/util/Identifier;- intermediary - field_55259- Lnet/minecraft/class_7528;field_55259:Lnet/minecraft/class_2960;- official - d- Lfom;d:Lakv;
 
- 
scrollYprivate double scrollY- Mappings:
- Namespace - Name - Mixin selector - named - scrollY- Lnet/minecraft/client/gui/widget/ScrollableWidget;scrollY:D- intermediary - field_39497- Lnet/minecraft/class_7528;field_39497:D- official - a- Lfom;a:D
 
- 
scrollbarDraggedprivate boolean scrollbarDragged- Mappings:
- Namespace - Name - Mixin selector - named - scrollbarDragged- Lnet/minecraft/client/gui/widget/ScrollableWidget;scrollbarDragged:Z- intermediary - field_39498- Lnet/minecraft/class_7528;field_39498:Z- official - e- Lfom;e:Z
 
 
- 
- 
Constructor Details- 
ScrollableWidget- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/client/gui/widget/ClickableWidget;<init>(IIIILnet/minecraft/text/Text;)V- intermediary - <init>- Lnet/minecraft/class_339;<init>(IIIILnet/minecraft/class_2561;)V- official - <init>- Lfos;<init>(IIIILwp;)V
 
 
- 
- 
Method Details- 
mouseScrolledpublic boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) Callback for when a mouse button scroll event has been captured.- Parameters:
- mouseX- the X coordinate of the mouse
- mouseY- the Y coordinate of the mouse
- horizontalAmount- the horizontal scroll amount
- verticalAmount- the vertical scroll amount
- Returns:
- trueto indicate that the event handling is successful/valid
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - mouseScrolled- Lnet/minecraft/client/gui/Element;mouseScrolled(DDDD)Z- intermediary - method_25401- Lnet/minecraft/class_364;method_25401(DDDD)Z- official - a- Lfqr;a(DDDD)Z
 
- 
mouseDraggedpublic boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) Callback for when a mouse button drag event has been captured. The button number is identified by the constants inGLFWclass.- Specified by:
- mouseDraggedin interface- Element
- Overrides:
- mouseDraggedin class- ClickableWidget
- Parameters:
- mouseX- the current X coordinate of the mouse
- mouseY- the current Y coordinate of the mouse
- button- the mouse button number
- deltaX- the difference of the current X with the previous X coordinate
- deltaY- the difference of the current Y with the previous Y coordinate
- Returns:
- trueto indicate that the event handling is successful/valid
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - mouseDragged- Lnet/minecraft/client/gui/Element;mouseDragged(DDIDD)Z- intermediary - method_25403- Lnet/minecraft/class_364;method_25403(DDIDD)Z- official - a- Lfqr;a(DDIDD)Z
 
- 
onReleasepublic void onRelease(double mouseX, double mouseY) - Overrides:
- onReleasein class- ClickableWidget
- Mappings:
- Namespace - Name - Mixin selector - named - onRelease- Lnet/minecraft/client/gui/widget/ClickableWidget;onRelease(DD)V- intermediary - method_25357- Lnet/minecraft/class_339;method_25357(DD)V- official - b- Lfos;b(DD)V
 
- 
getScrollYpublic double getScrollY()- Mappings:
- Namespace - Name - Mixin selector - named - getScrollY- Lnet/minecraft/client/gui/widget/ScrollableWidget;getScrollY()D- intermediary - method_44387- Lnet/minecraft/class_7528;method_44387()D- official - g- Lfom;g()D
 
- 
setScrollYpublic void setScrollY(double scrollY) - Mappings:
- Namespace - Name - Mixin selector - named - setScrollY- Lnet/minecraft/client/gui/widget/ScrollableWidget;setScrollY(D)V- intermediary - method_44382- Lnet/minecraft/class_7528;method_44382(D)V- official - a- Lfom;a(D)V
 
- 
checkScrollbarDraggedpublic boolean checkScrollbarDragged(double mouseX, double mouseY, int button) - Mappings:
- Namespace - Name - Mixin selector - named - checkScrollbarDragged- Lnet/minecraft/client/gui/widget/ScrollableWidget;checkScrollbarDragged(DDI)Z- intermediary - method_65505- Lnet/minecraft/class_7528;method_65505(DDI)Z- official - c- Lfom;c(DDI)Z
 
- 
refreshScrollpublic void refreshScroll()- Mappings:
- Namespace - Name - Mixin selector - named - refreshScroll- Lnet/minecraft/client/gui/widget/ScrollableWidget;refreshScroll()V- intermediary - method_65506- Lnet/minecraft/class_7528;method_65506()V- official - h- Lfom;h()V
 
- 
getMaxScrollYpublic int getMaxScrollY()- Mappings:
- Namespace - Name - Mixin selector - named - getMaxScrollY- Lnet/minecraft/client/gui/widget/ScrollableWidget;getMaxScrollY()I- intermediary - method_44390- Lnet/minecraft/class_7528;method_44390()I- official - i- Lfom;i()I
 
- 
overflowsprotected boolean overflows()Returns whether the contents overflow and needs a scrollbar.- Returns:
- whether the contents overflow and needs a scrollbar
- Mappings:
- Namespace - Name - Mixin selector - named - overflows- Lnet/minecraft/client/gui/widget/ScrollableWidget;overflows()Z- intermediary - method_44392- Lnet/minecraft/class_7528;method_44392()Z- official - j- Lfom;j()Z
 
- 
getScrollbarThumbHeightprotected int getScrollbarThumbHeight()- Mappings:
- Namespace - Name - Mixin selector - named - getScrollbarThumbHeight- Lnet/minecraft/client/gui/widget/ScrollableWidget;getScrollbarThumbHeight()I- intermediary - method_44394- Lnet/minecraft/class_7528;method_44394()I- official - k- Lfom;k()I
 
- 
getScrollbarXprotected int getScrollbarX()- Mappings:
- Namespace - Name - Mixin selector - named - getScrollbarX- Lnet/minecraft/client/gui/widget/ScrollableWidget;getScrollbarX()I- intermediary - method_65507- Lnet/minecraft/class_7528;method_65507()I- official - l- Lfom;l()I
 
- 
getScrollbarThumbYprotected int getScrollbarThumbY()- Mappings:
- Namespace - Name - Mixin selector - named - getScrollbarThumbY- Lnet/minecraft/client/gui/widget/ScrollableWidget;getScrollbarThumbY()I- intermediary - method_65508- Lnet/minecraft/class_7528;method_65508()I- official - m- Lfom;m()I
 
- 
drawScrollbar- Mappings:
- Namespace - Name - Mixin selector - named - drawScrollbar- Lnet/minecraft/client/gui/widget/ScrollableWidget;drawScrollbar(Lnet/minecraft/client/gui/DrawContext;)V- intermediary - method_44396- Lnet/minecraft/class_7528;method_44396(Lnet/minecraft/class_332;)V- official - a- Lfom;a(Lfof;)V
 
- 
getContentsHeightWithPaddingprotected abstract int getContentsHeightWithPadding()- Mappings:
- Namespace - Name - Mixin selector - named - getContentsHeightWithPadding- Lnet/minecraft/client/gui/widget/ScrollableWidget;getContentsHeightWithPadding()I- intermediary - method_44395- Lnet/minecraft/class_7528;method_44395()I- official - n- Lfom;n()I
 
- 
getDeltaYPerScrollprotected abstract double getDeltaYPerScroll()- Mappings:
- Namespace - Name - Mixin selector - named - getDeltaYPerScroll- Lnet/minecraft/client/gui/widget/ScrollableWidget;getDeltaYPerScroll()D- intermediary - method_44393- Lnet/minecraft/class_7528;method_44393()D- official - o- Lfom;o()D
 
 
-