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:
class_10415,ContainerWidget
A widget that can be focused and vertically scrolled.
- Mappings:
Namespace Name named net/minecraft/client/gui/widget/ScrollableWidgetintermediary net/minecraft/class_7528official fok
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final Identifierprivate booleanprivate 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 TypeMethodDescriptionprotected voiddrawScrollbar(DrawContext context) protected abstract intprotected abstract doubleintprotected intdoublebooleanmethod_65505(double double2, double double3, int int2) voidprotected intprotected intbooleanmouseDragged(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.voidsetScrollY(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, getFocusedPath, keyPressed, keyReleased, method_65515, mouseMovedMethods inherited from interface net.minecraft.client.gui.Selectable
method_65516Methods inherited from interface net.minecraft.client.gui.widget.Widget
setPosition
-
Field Details
-
field_55258
public static final int field_55258- See Also:
- Mappings:
Namespace Name Mixin selector named field_55258Lnet/minecraft/client/gui/widget/ScrollableWidget;field_55258:Iintermediary field_55258Lnet/minecraft/class_7528;field_55258:Iofficial bLfok;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 cLfok;c:Laku;
-
field_55259
- Mappings:
Namespace Name Mixin selector named field_55259Lnet/minecraft/client/gui/widget/ScrollableWidget;field_55259:Lnet/minecraft/util/Identifier;intermediary field_55259Lnet/minecraft/class_7528;field_55259:Lnet/minecraft/class_2960;official dLfok;d:Laku;
-
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 aLfok;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 eLfok;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>Lfop;<init>(IIIILwo;)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 aLfqp;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 aLfqp;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 bLfop;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 gLfok;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 aLfok;a(D)V
-
method_65505
public boolean method_65505(double double2, double double3, int int2) - Mappings:
Namespace Name Mixin selector named method_65505Lnet/minecraft/client/gui/widget/ScrollableWidget;method_65505(DDI)Zintermediary method_65505Lnet/minecraft/class_7528;method_65505(DDI)Zofficial cLfok;c(DDI)Z
-
method_65506
public void method_65506()- Mappings:
Namespace Name Mixin selector named method_65506Lnet/minecraft/client/gui/widget/ScrollableWidget;method_65506()Vintermediary method_65506Lnet/minecraft/class_7528;method_65506()Vofficial hLfok;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 iLfok;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 jLfok;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 kLfok;k()I
-
method_65507
protected int method_65507()- Mappings:
Namespace Name Mixin selector named method_65507Lnet/minecraft/client/gui/widget/ScrollableWidget;method_65507()Iintermediary method_65507Lnet/minecraft/class_7528;method_65507()Iofficial lLfok;l()I
-
method_65508
protected int method_65508()- Mappings:
Namespace Name Mixin selector named method_65508Lnet/minecraft/client/gui/widget/ScrollableWidget;method_65508()Iintermediary method_65508Lnet/minecraft/class_7528;method_65508()Iofficial mLfok;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 aLfok;a(Lfod;)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 nLfok;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 oLfok;o()D
-