Class AbstractScrollWidget

All Implemented Interfaces:
GuiEventListener, Renderable, NarratableEntry, NarrationSupplier
Direct Known Subclasses:
MultiLineEditBox, TelemetryEventWidget

public abstract class AbstractScrollWidget extends AbstractWidget implements Renderable, GuiEventListener
  • Field Details

    • BORDER_COLOR_FOCUSED

      private static final int BORDER_COLOR_FOCUSED
      See Also:
    • BORDER_COLOR

      private static final int BORDER_COLOR
      See Also:
    • BACKGROUND_COLOR

      private static final int BACKGROUND_COLOR
      See Also:
    • INNER_PADDING

      private static final int INNER_PADDING
      See Also:
    • scrollAmount

      private double scrollAmount
    • scrolling

      private boolean scrolling
  • Constructor Details

    • AbstractScrollWidget

      public AbstractScrollWidget(int p_240025_, int p_240026_, int p_240027_, int p_240028_, Component p_240029_)
  • Method Details

    • mouseClicked

      public boolean mouseClicked(double p_240170_, double p_240171_, int p_240172_)
      Specified by:
      mouseClicked in interface GuiEventListener
      Overrides:
      mouseClicked in class AbstractWidget
    • mouseReleased

      public boolean mouseReleased(double p_239063_, double p_239064_, int p_239065_)
      Specified by:
      mouseReleased in interface GuiEventListener
      Overrides:
      mouseReleased in class AbstractWidget
    • mouseDragged

      public boolean mouseDragged(double p_239639_, double p_239640_, int p_239641_, double p_239642_, double p_239643_)
      Specified by:
      mouseDragged in interface GuiEventListener
      Overrides:
      mouseDragged in class AbstractWidget
    • mouseScrolled

      public boolean mouseScrolled(double p_239308_, double p_239309_, double p_239310_)
      Specified by:
      mouseScrolled in interface GuiEventListener
    • renderButton

      public void renderButton(PoseStack p_239793_, int p_239794_, int p_239795_, float p_239796_)
      Overrides:
      renderButton in class AbstractWidget
    • getScrollBarHeight

      private int getScrollBarHeight()
    • renderDecorations

      protected void renderDecorations(PoseStack p_239981_)
    • innerPadding

      protected int innerPadding()
    • totalInnerPadding

      protected int totalInnerPadding()
    • scrollAmount

      protected double scrollAmount()
    • setScrollAmount

      protected void setScrollAmount(double p_240207_)
    • getMaxScrollAmount

      protected int getMaxScrollAmount()
    • getContentHeight

      private int getContentHeight()
    • renderBackground

      private void renderBackground(PoseStack p_240049_)
    • renderScrollBar

      private void renderScrollBar()
    • withinContentAreaTopBottom

      protected boolean withinContentAreaTopBottom(int p_239943_, int p_239944_)
    • withinContentAreaPoint

      protected boolean withinContentAreaPoint(double p_239607_, double p_239608_)
    • getInnerHeight

      protected abstract int getInnerHeight()
    • scrollbarVisible

      protected abstract boolean scrollbarVisible()
    • scrollRate

      protected abstract double scrollRate()
    • renderContents

      protected abstract void renderContents(PoseStack p_239198_, int p_239199_, int p_239200_, float p_239201_)