java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
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.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, height, itemHeight, minecraft, width, x0, x1, y0, y1

    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
    enableScissor(net.minecraft.client.gui.GuiGraphics graphics)
     
    protected void
     
    protected E
    entryAt(double x, double y)
    The row under a point, if any.
    int
     
    int
     
    protected E
     
    protected int
     
    int
     
    net.minecraft.client.gui.navigation.ScreenRectangle
     
    int
     
    protected int
    getRowBottom(int index)
     
    int
     
    protected int
    getRowTop(int index)
     
    protected int
     
    int
     
    int
     
    int
     
    boolean
    isMouseOver(double mouseX, double mouseY)
     
    int
     
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
     
    protected boolean
    removeEntry(E entry)
     
    void
    render(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
     
    protected void
    renderScrollbar(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY)
    A plain scrollbar, as vanilla's lists draw it, while the rows don't fit.
    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
    setPosition(int x, int y)
     
    void
    setScrollAmount(double scroll)
     
    void
    setSize(int width, int height)
     
    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, updateNarration

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

    addEntryToTop, children, clearEntries, clickedHeader, getEntry, getEntryAtPosition, getFirstElement, getFocused, getItemCount, getRowRight, getRowWidth, getScrollAmount, getScrollBottom, getSelected, mouseDragged, mouseReleased, mouseScrolled, narrateListElementPosition, nextEntry, nextEntry, nextEntry, remove, removeEntryFromTop, renderBackground, renderDecorations, renderHeader, renderItem, renderList, renderSelection, setLeftPos, setRenderBackground, setRenderHeader, setRenderSelection, setRenderTopAndBottom, setSelected, updateScrollingState, updateSize

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    isDragging, setDragging

    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, isFocused, keyPressed, keyReleased, magicalSpecialHackyFocus, setFocused

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

    mouseMoved

    Methods inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    isActive

    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

    • getX

      public int getX()
    • getY

      public int getY()
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • getRight

      public int getRight()
    • getBottom

      public int getBottom()
    • setPosition

      public void setPosition(int x, int y)
    • setSize

      public void setSize(int width, int height)
    • updateSizeAndPosition

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

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

      public net.minecraft.client.gui.navigation.ScreenRectangle getRectangle()
      Specified by:
      getRectangle in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      getRectangle in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • 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.
    • 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()
    • setScrollAmount

      public void setScrollAmount(double scroll)
      Overrides:
      setScrollAmount 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>>
    • isMouseOver

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

      public void render(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
      Specified by:
      render in interface net.minecraft.client.gui.components.Renderable
      Overrides:
      render in class net.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
    • enableScissor

      protected void enableScissor(net.minecraft.client.gui.GuiGraphics graphics)
      Overrides:
      enableScissor 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)
      A plain scrollbar, as vanilla's lists draw it, 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>>