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 ghe
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.ClickableWidget
ClickableWidget.InactivityIndicatingWidgetNested 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 mouseX, int mouseY) protected abstract intprotected abstract doubleintprotected intprotected intprotected intdoubleprotected booleanisInScrollbar(double mouseX, double mouseY) 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, drawTextWithMargin, forEachChild, getAlpha, getBottom, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getRight, getType, getWidth, getX, getY, isFocused, isHovered, isInteractable, isMouseOver, isSelected, isValidClickButton, method_76256, 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 bLghe;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 cLghe;c:Lamu;
-
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 dLghe;d:Lamu;
-
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 aLghe;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 eLghe;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>Lghj;<init>(IIIILyi;)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 aLgku;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 aLgku;a(Lgxi;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 aLghj;a(Lgxi;)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 hLghe;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 aLghe;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 cLghe;c(Lgxi;)Z
-
isInScrollbar
protected boolean isInScrollbar(double mouseX, double mouseY) - Mappings:
Namespace Name Mixin selector named isInScrollbarLnet/minecraft/client/gui/widget/ScrollableWidget;isInScrollbar(DD)Zintermediary method_74038Lnet/minecraft/class_7528;method_74038(DD)Zofficial aLghe;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 iLghe;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 jLghe;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 kLghe;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 lLghe;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 mLghe;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 nLghe;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 aLghe;a(Lggy;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 oLghe;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 pLghe;p()D
-