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 gdi
  • 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 Lgdi;b:I
    • SCROLLER_TEXTURE

      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 Lgdi;c:Lamj;
    • SCROLLER_BACKGROUND_TEXTURE

      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 Lgdi;d:Lamj;
    • 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 Lgdi;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 Lgdi;e:Z
  • Constructor Details

    • ScrollableWidget

      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> Lgdn;<init>(IIIILxx;)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 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 Lggw;a(DDDD)Z
    • mouseDragged

      public boolean mouseDragged(Click click, double offsetX, double offsetY)
      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
      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(Lnet/minecraft/client/gui/Click;DD)Z
      intermediary method_25403 Lnet/minecraft/class_364;method_25403(Lnet/minecraft/class_11909;DD)Z
      official a Lggw;a(Lgti;DD)Z
    • onRelease

      public void onRelease(Click click)
      Overrides:
      onRelease in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      named onRelease Lnet/minecraft/client/gui/widget/ClickableWidget;onRelease(Lnet/minecraft/client/gui/Click;)V
      intermediary method_25357 Lnet/minecraft/class_339;method_25357(Lnet/minecraft/class_11909;)V
      official b Lgdn;b(Lgti;)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 h Lgdi;h()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 Lgdi;a(D)V
    • checkScrollbarDragged

      public boolean checkScrollbarDragged(Click click)
      Mappings:
      Namespace Name Mixin selector
      named checkScrollbarDragged Lnet/minecraft/client/gui/widget/ScrollableWidget;checkScrollbarDragged(Lnet/minecraft/client/gui/Click;)Z
      intermediary method_65505 Lnet/minecraft/class_7528;method_65505(Lnet/minecraft/class_11909;)Z
      official c Lgdi;c(Lgti;)Z
    • method_74038

      protected boolean method_74038(double double2, double double3)
      Mappings:
      Namespace Name Mixin selector
      named method_74038 Lnet/minecraft/client/gui/widget/ScrollableWidget;method_74038(DD)Z
      intermediary method_74038 Lnet/minecraft/class_7528;method_74038(DD)Z
      official a Lgdi;a(DD)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 i Lgdi;i()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 j Lgdi;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 overflows Lnet/minecraft/client/gui/widget/ScrollableWidget;overflows()Z
      intermediary method_44392 Lnet/minecraft/class_7528;method_44392()Z
      official k Lgdi;k()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 l Lgdi;l()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 m Lgdi;m()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 n Lgdi;n()I
    • drawScrollbar

      protected void drawScrollbar(DrawContext context, int int2, int int3)
      Mappings:
      Namespace Name Mixin selector
      named drawScrollbar Lnet/minecraft/client/gui/widget/ScrollableWidget;drawScrollbar(Lnet/minecraft/client/gui/DrawContext;II)V
      intermediary method_44396 Lnet/minecraft/class_7528;method_44396(Lnet/minecraft/class_332;II)V
      official a Lgdi;a(Lgdd;II)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 o Lgdi;o()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 p Lgdi;p()D