Class AbstractScrollArea

java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollArea
All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
Direct Known Subclasses:
AbstractContainerWidget, AbstractTextAreaWidget

public abstract class AbstractScrollArea extends AbstractWidget
  • Field Details

    • SCROLLBAR_WIDTH

      public static final int SCROLLBAR_WIDTH
      See Also:
    • SCROLLBAR_MIN_HEIGHT

      private static final int SCROLLBAR_MIN_HEIGHT
      See Also:
    • SCROLLER_SPRITE

      private static final Identifier SCROLLER_SPRITE
    • SCROLLER_BACKGROUND_SPRITE

      private static final Identifier SCROLLER_BACKGROUND_SPRITE
    • scrollbarSettings

      private final AbstractScrollArea.ScrollbarSettings scrollbarSettings
    • scrollAmount

      private double scrollAmount
    • scrolling

      private boolean scrolling
  • Constructor Details

  • Method Details

    • mouseScrolled

      public boolean mouseScrolled(double mx, double my, double scrollX, double scrollY)
    • mouseDragged

      public boolean mouseDragged(MouseButtonEvent event, double dx, double dy)
      Specified by:
      mouseDragged in interface GuiEventListener
      Overrides:
      mouseDragged in class AbstractWidget
    • onRelease

      public void onRelease(MouseButtonEvent event)
      Overrides:
      onRelease in class AbstractWidget
    • scrollAmount

      public double scrollAmount()
    • setScrollAmount

      public void setScrollAmount(double scrollAmount)
    • updateScrolling

      public boolean updateScrolling(MouseButtonEvent event)
    • isOverScrollbar

      protected boolean isOverScrollbar(double x, double y)
    • refreshScrollAmount

      public void refreshScrollAmount()
    • maxScrollAmount

      public int maxScrollAmount()
    • scrollable

      protected boolean scrollable()
    • scrollbarWidth

      public int scrollbarWidth()
    • scrollerHeight

      protected int scrollerHeight()
    • scrollBarX

      protected int scrollBarX()
    • scrollBarY

      public int scrollBarY()
    • renderScrollbar

      protected void renderScrollbar(GuiGraphics graphics, int mouseX, int mouseY)
    • contentHeight

      protected abstract int contentHeight()
    • scrollRate

      protected double scrollRate()
    • defaultSettings

      public static AbstractScrollArea.ScrollbarSettings defaultSettings(int scrollRate)