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

@Environment(CLIENT) public abstract class ScrollableWidget extends ClickableWidget
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
  • Field Details Link icon

    • SCROLLBAR_WIDTH Link icon

      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 Link icon

      private static final Identifier 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 Link icon

      private static final Identifier 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 Link icon

      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 Link icon

      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 Link icon

    • ScrollableWidget Link icon

      public ScrollableWidget(int x, int y, int width, int height, Text message)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/gui/widget/ClickableWidget;<init>(IIIILnet/minecraft/text/Text;)V
      intermediary <init> Lnet/minecraft/class_339;<init>(IIIILnet/minecraft/class_2561;)V
      official <init> Lfos;<init>(IIIILwp;)V
  • Method Details Link icon

    • mouseScrolled Link icon

      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 mouse
      mouseY - the Y coordinate of the mouse
      horizontalAmount - the horizontal scroll amount
      verticalAmount - 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 Link icon

      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 in GLFW class.
      Specified by:
      mouseDragged in interface Element
      Overrides:
      mouseDragged in class ClickableWidget
      Parameters:
      mouseX - the current X coordinate of the mouse
      mouseY - the current Y coordinate of the mouse
      button - the mouse button number
      deltaX - the difference of the current X with the previous X coordinate
      deltaY - 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 Link icon

      public void onRelease(double mouseX, double mouseY)
      Overrides:
      onRelease in class ClickableWidget
      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      protected void drawScrollbar(DrawContext context)
      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 Link icon

      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 Link icon

      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