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/ScrollableWidgetintermediary net/minecraft/class_7528official gdi
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate booleanprivate static final Identifierprivate static final Identifierprivate double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckScrollbarDragged(Click click) protected voiddrawScrollbar(DrawContext context, int int2, int int3) protected abstract intprotected abstract doubleintprotected intprotected intprotected intdoubleprotected booleanmethod_74038(double double2, double double3) booleanmouseDragged(Click click, double offsetX, double offsetY) 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.voidprotected booleanReturns whether the contents overflow and needs a scrollbar.voidvoidsetScrollY(double scrollY) Methods inherited from class net.minecraft.client.gui.widget.ClickableWidget
appendClickableNarrations, appendDefaultNarrations, appendNarrations, drawScrollableText, drawScrollableText, drawScrollableText, forEachChild, getBottom, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getRight, getType, getWidth, getX, getY, isFocused, isHovered, isInteractable, isMouseOver, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
charTyped, getBorder, getFocusedPath, isClickable, keyPressed, keyReleased, mouseMovedMethods inherited from interface net.minecraft.client.gui.Selectable
getNarratedPartsMethods inherited from interface net.minecraft.client.gui.widget.Widget
setPosition
-
Field Details
-
SCROLLBAR_WIDTH
public static final int SCROLLBAR_WIDTH- See Also:
- Mappings:
Namespace Name Mixin selector named SCROLLBAR_WIDTHLnet/minecraft/client/gui/widget/ScrollableWidget;SCROLLBAR_WIDTH:Iintermediary field_55258Lnet/minecraft/class_7528;field_55258:Iofficial bLgdi;b:I
-
SCROLLER_TEXTURE
- Mappings:
Namespace Name Mixin selector named SCROLLER_TEXTURELnet/minecraft/client/gui/widget/ScrollableWidget;SCROLLER_TEXTURE:Lnet/minecraft/util/Identifier;intermediary field_45906Lnet/minecraft/class_7528;field_45906:Lnet/minecraft/class_2960;official cLgdi;c:Lamj;
-
SCROLLER_BACKGROUND_TEXTURE
- Mappings:
Namespace Name Mixin selector named SCROLLER_BACKGROUND_TEXTURELnet/minecraft/client/gui/widget/ScrollableWidget;SCROLLER_BACKGROUND_TEXTURE:Lnet/minecraft/util/Identifier;intermediary field_55259Lnet/minecraft/class_7528;field_55259:Lnet/minecraft/class_2960;official dLgdi;d:Lamj;
-
scrollY
private double scrollY- Mappings:
Namespace Name Mixin selector named scrollYLnet/minecraft/client/gui/widget/ScrollableWidget;scrollY:Dintermediary field_39497Lnet/minecraft/class_7528;field_39497:Dofficial aLgdi;a:D
-
scrollbarDragged
private boolean scrollbarDragged- Mappings:
Namespace Name Mixin selector named scrollbarDraggedLnet/minecraft/client/gui/widget/ScrollableWidget;scrollbarDragged:Zintermediary field_39498Lnet/minecraft/class_7528;field_39498:Zofficial eLgdi;e:Z
-
-
Constructor Details
-
ScrollableWidget
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/gui/widget/ClickableWidget;<init>(IIIILnet/minecraft/text/Text;)Vintermediary <init>Lnet/minecraft/class_339;<init>(IIIILnet/minecraft/class_2561;)Vofficial <init>Lgdn;<init>(IIIILxx;)V
-
-
Method Details
-
mouseScrolled
public 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 mousemouseY- the Y coordinate of the mousehorizontalAmount- the horizontal scroll amountverticalAmount- the vertical scroll amount- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseScrolledLnet/minecraft/client/gui/Element;mouseScrolled(DDDD)Zintermediary method_25401Lnet/minecraft/class_364;method_25401(DDDD)Zofficial aLggw;a(DDDD)Z
-
mouseDragged
Callback for when a mouse button drag event has been captured. The button number is identified by the constants inGLFWclass.- Specified by:
mouseDraggedin interfaceElement- Overrides:
mouseDraggedin classClickableWidget- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseDraggedLnet/minecraft/client/gui/Element;mouseDragged(Lnet/minecraft/client/gui/Click;DD)Zintermediary method_25403Lnet/minecraft/class_364;method_25403(Lnet/minecraft/class_11909;DD)Zofficial aLggw;a(Lgti;DD)Z
-
onRelease
- Overrides:
onReleasein classClickableWidget- Mappings:
Namespace Name Mixin selector named onReleaseLnet/minecraft/client/gui/widget/ClickableWidget;onRelease(Lnet/minecraft/client/gui/Click;)Vintermediary method_25357Lnet/minecraft/class_339;method_25357(Lnet/minecraft/class_11909;)Vofficial bLgdn;b(Lgti;)V
-
getScrollY
public double getScrollY()- Mappings:
Namespace Name Mixin selector named getScrollYLnet/minecraft/client/gui/widget/ScrollableWidget;getScrollY()Dintermediary method_44387Lnet/minecraft/class_7528;method_44387()Dofficial hLgdi;h()D
-
setScrollY
public void setScrollY(double scrollY) - Mappings:
Namespace Name Mixin selector named setScrollYLnet/minecraft/client/gui/widget/ScrollableWidget;setScrollY(D)Vintermediary method_44382Lnet/minecraft/class_7528;method_44382(D)Vofficial aLgdi;a(D)V
-
checkScrollbarDragged
- Mappings:
Namespace Name Mixin selector named checkScrollbarDraggedLnet/minecraft/client/gui/widget/ScrollableWidget;checkScrollbarDragged(Lnet/minecraft/client/gui/Click;)Zintermediary method_65505Lnet/minecraft/class_7528;method_65505(Lnet/minecraft/class_11909;)Zofficial cLgdi;c(Lgti;)Z
-
method_74038
protected boolean method_74038(double double2, double double3) - Mappings:
Namespace Name Mixin selector named method_74038Lnet/minecraft/client/gui/widget/ScrollableWidget;method_74038(DD)Zintermediary method_74038Lnet/minecraft/class_7528;method_74038(DD)Zofficial aLgdi;a(DD)Z
-
refreshScroll
public void refreshScroll()- Mappings:
Namespace Name Mixin selector named refreshScrollLnet/minecraft/client/gui/widget/ScrollableWidget;refreshScroll()Vintermediary method_65506Lnet/minecraft/class_7528;method_65506()Vofficial iLgdi;i()V
-
getMaxScrollY
public int getMaxScrollY()- Mappings:
Namespace Name Mixin selector named getMaxScrollYLnet/minecraft/client/gui/widget/ScrollableWidget;getMaxScrollY()Iintermediary method_44390Lnet/minecraft/class_7528;method_44390()Iofficial jLgdi;j()I
-
overflows
protected 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 overflowsLnet/minecraft/client/gui/widget/ScrollableWidget;overflows()Zintermediary method_44392Lnet/minecraft/class_7528;method_44392()Zofficial kLgdi;k()Z
-
getScrollbarThumbHeight
protected int getScrollbarThumbHeight()- Mappings:
Namespace Name Mixin selector named getScrollbarThumbHeightLnet/minecraft/client/gui/widget/ScrollableWidget;getScrollbarThumbHeight()Iintermediary method_44394Lnet/minecraft/class_7528;method_44394()Iofficial lLgdi;l()I
-
getScrollbarX
protected int getScrollbarX()- Mappings:
Namespace Name Mixin selector named getScrollbarXLnet/minecraft/client/gui/widget/ScrollableWidget;getScrollbarX()Iintermediary method_65507Lnet/minecraft/class_7528;method_65507()Iofficial mLgdi;m()I
-
getScrollbarThumbY
protected int getScrollbarThumbY()- Mappings:
Namespace Name Mixin selector named getScrollbarThumbYLnet/minecraft/client/gui/widget/ScrollableWidget;getScrollbarThumbY()Iintermediary method_65508Lnet/minecraft/class_7528;method_65508()Iofficial nLgdi;n()I
-
drawScrollbar
- Mappings:
Namespace Name Mixin selector named drawScrollbarLnet/minecraft/client/gui/widget/ScrollableWidget;drawScrollbar(Lnet/minecraft/client/gui/DrawContext;II)Vintermediary method_44396Lnet/minecraft/class_7528;method_44396(Lnet/minecraft/class_332;II)Vofficial aLgdi;a(Lgdd;II)V
-
getContentsHeightWithPadding
protected abstract int getContentsHeightWithPadding()- Mappings:
Namespace Name Mixin selector named getContentsHeightWithPaddingLnet/minecraft/client/gui/widget/ScrollableWidget;getContentsHeightWithPadding()Iintermediary method_44395Lnet/minecraft/class_7528;method_44395()Iofficial oLgdi;o()I
-
getDeltaYPerScroll
protected abstract double getDeltaYPerScroll()- Mappings:
Namespace Name Mixin selector named getDeltaYPerScrollLnet/minecraft/client/gui/widget/ScrollableWidget;getDeltaYPerScroll()Dintermediary method_44393Lnet/minecraft/class_7528;method_44393()Dofficial pLgdi;p()D
-