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 Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private boolean
private static final Identifier
private static final Identifier
private double
Fields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, visible, width
Fields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkScrollbarDragged
(double mouseX, double mouseY, int button) protected void
drawScrollbar
(DrawContext context) protected abstract int
protected abstract double
int
protected int
protected int
protected int
double
boolean
mouseDragged
(double mouseX, double mouseY, int button, double deltaX, double deltaY) Callback for when a mouse button drag event has been captured.boolean
mouseScrolled
(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) Callback for when a mouse button scroll event has been captured.void
onRelease
(double mouseX, double mouseY) protected boolean
Returns whether the contents overflow and needs a scrollbar.void
void
setScrollY
(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, setY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.Element
charTyped, getBorder, getFocusedPath, keyPressed, keyReleased, mouseMoved
Methods inherited from interface net.minecraft.client.gui.Selectable
getNarratedParts
Methods 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_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;
-
scrollY
private 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
-
scrollbarDragged
private 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
-
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:
true
to 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
-
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 inGLFW
class.- Specified by:
mouseDragged
in interfaceElement
- Overrides:
mouseDragged
in 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:
true
to 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
-
onRelease
public void onRelease(double mouseX, double mouseY) - Overrides:
onRelease
in classClickableWidget
- 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
-
getScrollY
public 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
-
setScrollY
public 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
-
checkScrollbarDragged
public 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
-
refreshScroll
public 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
-
getMaxScrollY
public 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
-
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 overflows
Lnet/minecraft/client/gui/widget/ScrollableWidget;overflows()Z
intermediary method_44392
Lnet/minecraft/class_7528;method_44392()Z
official j
Lfom;j()Z
-
getScrollbarThumbHeight
protected 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
-
getScrollbarX
protected 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
-
getScrollbarThumbY
protected 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
-
getContentsHeightWithPadding
protected 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
-
getDeltaYPerScroll
protected 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
-