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 ClassesModifier and TypeClassDescriptionclassA 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 extends net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry<E>>Nested classes/interfaces inherited from class net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractWidget.WithInactiveMessageNested 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, minecraftFields inherited from class net.minecraft.client.gui.components.AbstractScrollArea
SCROLLBAR_WIDTHFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, message, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionWidgetCreatorList(net.minecraft.client.Minecraft minecraftClient, int width, int height, int top, int itemHeight) Deprecated, for removal: This API element is subject to removal in a future version.WidgetCreatorList(net.minecraft.client.Minecraft minecraftClient, int width, int height, int top, int bottom, int itemHeight) Deprecated, for removal: This API element is subject to removal in a future version.Mojang (rightfully) removed the bottom in 1.20.3, useWidgetCreatorList(Minecraft, int, int, int, int)insteadWidgetCreatorList(net.minecraft.client.Minecraft minecraftClient, int width, net.minecraft.client.gui.layouts.HeaderAndFooterLayout layout) Creates an empty widget list -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAll(WidgetCreator[] options) Add an array of widget creators.voidaddEntries(WidgetCreator first, @Nullable WidgetCreator other) Add two entries.voidaddWideEntry(WidgetCreator creator) Add a single, wide entry.intMethods inherited from class net.minecraft.client.gui.components.ContainerObjectSelectionList
entriesCanBeSelected, narrationPriority, nextFocusPath, setFocused, updateWidgetNarrationMethods inherited from class net.minecraft.client.gui.components.AbstractSelectionList
addEntry, addEntry, addEntryToTop, addEntryToTop, centerScrollOn, children, clearEntries, clearEntriesExcept, contentHeight, enableScissor, getChildAt, getEntryAtPosition, getFocused, getHovered, getItemCount, getNextY, getRowBottom, getRowLeft, getRowRight, getRowTop, getSelected, narrateListElementPosition, nextEntry, nextEntry, nextEntry, removeEntries, removeEntry, removeEntryFromTop, renderItem, renderListBackground, renderListItems, renderListSeparators, renderSelection, renderWidget, replaceEntries, scrollBarX, scrollRate, scrollToEntry, setFocused, setScrollAmount, setSelected, sort, swap, updateSize, updateSizeAndPosition, updateSizeAndPositionMethods inherited from class net.minecraft.client.gui.components.AbstractContainerWidget
isDragging, isFocused, mouseClicked, mouseDragged, mouseReleased, setDraggingMethods inherited from class net.minecraft.client.gui.components.AbstractScrollArea
isOverScrollbar, maxScrollAmount, mouseScrolled, onRelease, refreshScrollAmount, renderScrollbar, scrollAmount, scrollbarVisible, scrollBarY, scrollerHeight, updateScrollingMethods inherited from class net.minecraft.client.gui.components.AbstractWidget
createNarrationMessage, defaultButtonNarrationText, getAlpha, getBottom, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, onClick, onDrag, playButtonClickSound, playDownSound, render, renderScrollingStringOverContents, setAlpha, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getCurrentFocusPath, keyPressed, keyReleased, mouseScrolledMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
getNarratablesMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
WidgetCreatorList
@Deprecated(since="1.1.0", forRemoval=true) public WidgetCreatorList(net.minecraft.client.Minecraft minecraftClient, int width, int height, int top, int bottom, int itemHeight) Deprecated, for removal: This API element is subject to removal in a future version.Mojang (rightfully) removed the bottom in 1.20.3, useWidgetCreatorList(Minecraft, int, int, int, int)insteadCreates an empty widget list- Parameters:
minecraftClient- The Minecraft client instancewidth- The width of the listheight- The height of the listtop- The top position of the listbottom- UNUSED PARAMETER, USE OTHER CONSTRUCTORitemHeight- The height of each widget, usually 20- See Also:
-
WidgetCreatorList
@Deprecated(since="1.10.0", forRemoval=true) public WidgetCreatorList(net.minecraft.client.Minecraft minecraftClient, int width, int height, int top, int itemHeight) Deprecated, for removal: This API element is subject to removal in a future version.You should be wrapping the widget in the body of aHeaderAndFooterLayoutCreates an empty widget list- Parameters:
minecraftClient- The Minecraft client instancewidth- The width of the listheight- The height of the listtop- The top position of the listitemHeight- The height of each widget, usually 20- See Also:
-
-
Method Details
-
addEntries
Add two entries. Ifotherisnull,firstwill *not* take up the full width.- Parameters:
first- The first widget creatorother- The second widget creator; nullable
-
addWideEntry
Add a single, wide entry.- Parameters:
creator- The widget creator
-
addAll
Add an array of widget creators.- Parameters:
options- The widget creator- See Also:
-
getRowWidth
public int getRowWidth()- Overrides:
getRowWidthin classnet.minecraft.client.gui.components.AbstractSelectionList<WidgetCreatorList.ButtonEntry>
-
HeaderAndFooterLayout