Class WidgetCreatorList

java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractScrollArea
net.minecraft.client.gui.components.AbstractContainerWidget
net.minecraft.client.gui.components.AbstractSelectionList<WidgetCreatorList.ButtonEntry>
net.minecraft.client.gui.components.ContainerObjectSelectionList<@NotNull WidgetCreatorList.ButtonEntry>
net.uku3lig.ukulib.config.option.widget.WidgetCreatorList
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

public class WidgetCreatorList extends net.minecraft.client.gui.components.ContainerObjectSelectionList<@NotNull WidgetCreatorList.ButtonEntry>
A list of WidgetCreator, used to construct a vertical list of widgets
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    A widget entry, made of one or two creators.

    Nested classes/interfaces inherited from class net.minecraft.client.gui.components.ContainerObjectSelectionList

    net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry<E>

    Nested classes/interfaces inherited from class net.minecraft.client.gui.components.AbstractScrollArea

    net.minecraft.client.gui.components.AbstractScrollArea.ScrollbarSettings

    Nested classes/interfaces inherited from class net.minecraft.client.gui.components.AbstractWidget

    net.minecraft.client.gui.components.AbstractWidget.WithInactiveMessage

    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, defaultEntryHeight, minecraft

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

    SCROLLBAR_WIDTH

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

    active, alpha, height, isHovered, message, visible, width
  • Constructor Summary

    Constructors
    Constructor
    Description
    WidgetCreatorList(net.minecraft.client.Minecraft minecraftClient, int width, net.minecraft.client.gui.layouts.HeaderAndFooterLayout layout)
    Creates an empty widget list
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAll(WidgetCreator[] options)
    Add an array of widget creators.
    void
    addEntries(WidgetCreator first, @Nullable WidgetCreator other)
    Add two entries.
    void
    Add a single, wide entry.
    int
     

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

    entriesCanBeSelected, narrationPriority, nextFocusPath, setFocused, updateWidgetNarration

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

    addEntry, addEntry, addEntryToTop, addEntryToTop, centerScrollOn, children, clearEntries, clearEntriesExcept, contentHeight, enableScissor, extractItem, extractListBackground, extractListItems, extractListSeparators, extractSelection, extractWidgetRenderState, getChildAt, getEntryAtPosition, getFocused, getHovered, getItemCount, getNextY, getRowBottom, getRowLeft, getRowRight, getRowTop, getSelected, narrateListElementPosition, nextEntry, nextEntry, nextEntry, removeEntries, removeEntry, removeEntryFromTop, replaceEntries, scrollBarX, scrollToEntry, setScrollAmount, setSelected, sort, swap, updateSize, updateSizeAndPosition, updateSizeAndPosition

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

    isDragging, isFocused, mouseClicked, mouseDragged, mouseReleased, setDragging, setFocused

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

    defaultSettings, extractScrollbar, isOverScrollbar, maxScrollAmount, mouseScrolled, onRelease, refreshScrollAmount, scrollable, scrollAmount, scrollbarWidth, scrollBarY, scrollerHeight, scrollRate, updateScrolling

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

    createNarrationMessage, defaultButtonNarrationText, extractRenderState, extractScrollingStringOverContents, extractTooltipForNextRenderPass, getAlpha, getBottom, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, onClick, onDrag, playButtonClickSound, playDownSound, setAlpha, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage

    Methods inherited from class Object

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

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

    charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyPressed, keyReleased, mouseScrolled, preeditUpdated

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

    getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteraction

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

    setPosition

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

    getNarratables

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

    getTabOrderGroup
  • Constructor Details

    • WidgetCreatorList

      public WidgetCreatorList(net.minecraft.client.Minecraft minecraftClient, int width, net.minecraft.client.gui.layouts.HeaderAndFooterLayout layout)
      Creates an empty widget list
      Parameters:
      minecraftClient - The Minecraft client instance
      width - The width of the list
      layout - The containing HeaderAndFooterLayout, used to compute the size
  • Method Details

    • addEntries

      public void addEntries(WidgetCreator first, @Nullable @Nullable WidgetCreator other)
      Add two entries. If other is null, first will *not* take up the full width.
      Parameters:
      first - The first widget creator
      other - The second widget creator; nullable
    • addWideEntry

      public void addWideEntry(WidgetCreator creator)
      Add a single, wide entry.
      Parameters:
      creator - The widget creator
    • addAll

      public void addAll(WidgetCreator[] options)
      Add an array of widget creators.
      Parameters:
      options - The widget creator
      See Also:
    • getRowWidth

      public int getRowWidth()
      Overrides:
      getRowWidth in class net.minecraft.client.gui.components.AbstractSelectionList<WidgetCreatorList.ButtonEntry>