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 fxg
  • 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 Lfxg;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 Lfxg;c:Lame;
    • 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 Lfxg;d:Lame;
    • 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 Lfxg;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 Lfxg;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> Lfxl;<init>(IIIILxo;)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 Lfzm;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 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 Lfzm;a(DDIDD)Z
    • onRelease

      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 Lfxl;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 Lfxg;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 Lfxg;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 Lfxg;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 Lfxg;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 Lfxg;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 Lfxg;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 Lfxg;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 Lfxg;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 Lfxg;m()I
    • drawScrollbar

      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 c Lfxg;c(Lfxa;)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 Lfxg;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 Lfxg;o()D