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 ftr
-
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 doubleFields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, visible, widthFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Constructor Summary
Constructors -
Method Summary
Modifier 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.ClickableWidget
appendClickableNarrations, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
charTyped, getBorder, getFocusedPath, 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 bLftr;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 cLftr;c:Lalr;
-
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 dLftr;d:Lalr;
-
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 aLftr;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 eLftr;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>Lftw;<init>(IIIILxg;)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 aLfvv;a(DDDD)Z
-
mouseDragged
public 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 interfaceElement- Overrides:
mouseDraggedin classClickableWidget- Parameters:
mouseX- the current X coordinate of the mousemouseY- the current Y coordinate of the mousebutton- the mouse button numberdeltaX- the difference of the current X with the previous X coordinatedeltaY- 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 mouseDraggedLnet/minecraft/client/gui/Element;mouseDragged(DDIDD)Zintermediary method_25403Lnet/minecraft/class_364;method_25403(DDIDD)Zofficial aLfvv;a(DDIDD)Z
-
onRelease
public void onRelease(double mouseX, double mouseY) - Overrides:
onReleasein classClickableWidget- Mappings:
Namespace Name Mixin selector named onReleaseLnet/minecraft/client/gui/widget/ClickableWidget;onRelease(DD)Vintermediary method_25357Lnet/minecraft/class_339;method_25357(DD)Vofficial bLftw;b(DD)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 gLftr;g()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 aLftr;a(D)V
-
checkScrollbarDragged
public boolean checkScrollbarDragged(double mouseX, double mouseY, int button) - Mappings:
Namespace Name Mixin selector named checkScrollbarDraggedLnet/minecraft/client/gui/widget/ScrollableWidget;checkScrollbarDragged(DDI)Zintermediary method_65505Lnet/minecraft/class_7528;method_65505(DDI)Zofficial cLftr;c(DDI)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 hLftr;h()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 iLftr;i()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 jLftr;j()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 kLftr;k()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 lLftr;l()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 mLftr;m()I
-
drawScrollbar
- Mappings:
Namespace Name Mixin selector named drawScrollbarLnet/minecraft/client/gui/widget/ScrollableWidget;drawScrollbar(Lnet/minecraft/client/gui/DrawContext;)Vintermediary method_44396Lnet/minecraft/class_7528;method_44396(Lnet/minecraft/class_332;)Vofficial aLftr;a(Lftk;)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 nLftr;n()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 oLftr;o()D
-