java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractContainerWidget
net.minecraft.client.gui.components.AbstractSelectionList<E>
net.minecraft.client.gui.components.ContainerObjectSelectionList<E>
net.ixdarklord.coolcatcore.internal.config.client.gui.style.StyledList<E>
All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier
Direct Known Subclasses:
ConfigEntryList

public abstract class StyledList<E extends StyledList.Entry<E>> extends net.minecraft.client.gui.components.ContainerObjectSelectionList<E>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A row, with its own height; the list sets its bounds as it lays the rows out.

    Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
  • Field Summary

    Fields inherited from class net.minecraft.client.gui.components.AbstractSelectionList

    centerListVertically, headerHeight, itemHeight, minecraft

    Fields inherited from class net.minecraft.client.gui.components.AbstractWidget

    active, alpha, height, isHovered, visible, width

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    StyledList(net.minecraft.client.Minecraft minecraft, int width, int height, int y, int defaultEntryHeight)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected int
    addEntry(E entry)
     
    protected int
    addEntry(E entry, int height)
     
    protected void
     
    protected int
    The rows' total height.
    protected void
     
    protected E
    entryAt(double x, double y)
    The row under a point, if any.
    protected E
     
    protected int
     
    int
     
    protected int
    getRowBottom(int index)
     
    int
     
    protected int
    getRowTop(int index)
     
    protected int
     
    int
     
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
     
    protected boolean
    removeEntry(E entry)
     
    protected void
    renderListBackground(net.minecraft.client.gui.GuiGraphics graphics)
     
    protected void
    renderListSeparators(net.minecraft.client.gui.GuiGraphics graphics)
     
    protected void
    renderScrollbar(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY)
    Vanilla's scrollbar, while the rows don't fit.
    void
    renderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
     
    void
     
    protected void
    Places every row under the one before it, for the current position and scroll.
    protected boolean
     
    double
     
    protected int
     
    protected int
     
    protected int
     
    void
    setClampedScrollAmount(double scroll)
     
    void
    updateSizeAndPosition(int width, int height, int y)
     
    void
    updateSizeAndPosition(int width, int height, int x, int y)
     

    Methods inherited from class net.minecraft.client.gui.components.ContainerObjectSelectionList

    isSelectedItem, nextFocusPath, setFocused, updateWidgetNarration

    Methods inherited from class net.minecraft.client.gui.components.AbstractSelectionList

    addEntryToTop, children, clampScrollAmount, clearEntries, clickedHeader, enableScissor, getDefaultScrollbarPosition, getEntry, getEntryAtPosition, getFirstElement, getFocused, getItemCount, getRowRight, getRowWidth, getScrollAmount, getSelected, isMouseOver, isValidMouseClick, mouseDragged, mouseReleased, mouseScrolled, narrateListElementPosition, nextEntry, nextEntry, nextEntry, remove, removeEntryFromTop, renderDecorations, renderHeader, renderItem, renderListItems, renderSelection, scrollbarVisible, setRenderHeader, setScrollAmount, setSelected, updateScrollingState, updateSize

    Methods inherited from class net.minecraft.client.gui.components.AbstractContainerWidget

    isDragging, isFocused, setDragging, setFocused

    Methods inherited from class net.minecraft.client.gui.components.AbstractWidget

    clicked, createNarrationMessage, defaultButtonNarrationText, getBottom, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isHovered, isHoveredOrFocused, isValidClickButton, onClick, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    charTyped, getChildAt, getCurrentFocusPath, keyPressed, keyReleased

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    getRectangle, mouseMoved

    Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement

    setPosition

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Constructor Details

    • StyledList

      protected StyledList(net.minecraft.client.Minecraft minecraft, int width, int height, int y, int defaultEntryHeight)
  • Method Details

    • addEntry

      protected int addEntry(E entry)
      Overrides:
      addEntry in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • addEntry

      protected int addEntry(E entry, int height)
    • replaceEntries

      public void replaceEntries(Collection<E> entries)
      Overrides:
      replaceEntries in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • removeEntry

      protected boolean removeEntry(E entry)
      Overrides:
      removeEntry in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • repositionEntries

      protected void repositionEntries()
      Places every row under the one before it, for the current position and scroll.
    • updateSizeAndPosition

      public void updateSizeAndPosition(int width, int height, int x, int y)
    • updateSizeAndPosition

      public void updateSizeAndPosition(int width, int height, int y)
      Overrides:
      updateSizeAndPosition in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • getRowLeft

      public int getRowLeft()
      Overrides:
      getRowLeft in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • getRowTop

      protected int getRowTop(int index)
      Overrides:
      getRowTop in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • getRowBottom

      protected int getRowBottom(int index)
      Overrides:
      getRowBottom in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • contentHeight

      protected int contentHeight()
      The rows' total height.
    • getMaxPosition

      protected int getMaxPosition()
      Overrides:
      getMaxPosition in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • getMaxScroll

      public int getMaxScroll()
      Overrides:
      getMaxScroll in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • maxScrollAmount

      public int maxScrollAmount()
    • scrollAmount

      public double scrollAmount()
    • setClampedScrollAmount

      public void setClampedScrollAmount(double scroll)
      Overrides:
      setClampedScrollAmount in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • scrollable

      protected boolean scrollable()
    • scrollBarX

      protected int scrollBarX()
    • getScrollbarPosition

      protected int getScrollbarPosition()
      Overrides:
      getScrollbarPosition in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • scrollerHeight

      protected int scrollerHeight()
    • scrollBarY

      protected int scrollBarY()
    • ensureVisible

      protected void ensureVisible(E entry)
      Overrides:
      ensureVisible in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • centerScrollOn

      protected void centerScrollOn(E entry)
      Overrides:
      centerScrollOn in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • entryAt

      @Nullable protected E entryAt(double x, double y)
      The row under a point, if any.
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseClicked in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • renderWidget

      public void renderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
      Overrides:
      renderWidget in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • renderListBackground

      protected void renderListBackground(net.minecraft.client.gui.GuiGraphics graphics)
      Overrides:
      renderListBackground in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • renderListSeparators

      protected void renderListSeparators(net.minecraft.client.gui.GuiGraphics graphics)
      Overrides:
      renderListSeparators in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • renderScrollbar

      protected void renderScrollbar(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY)
      Vanilla's scrollbar, while the rows don't fit.
    • getHovered

      @Nullable protected E getHovered()
      Overrides:
      getHovered in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • narrationPriority

      public net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority narrationPriority()
      Specified by:
      narrationPriority in interface net.minecraft.client.gui.narration.NarratableEntry
      Overrides:
      narrationPriority in class net.minecraft.client.gui.components.ContainerObjectSelectionList<E extends StyledList.Entry<E>>