Class StyledList<E extends StyledList.Entry<E>>
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 ClassesModifier and TypeClassDescriptionstatic classStyledList.Entry<E extends StyledList.Entry<E>>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, minecraftFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, visible, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStyledList(net.minecraft.client.Minecraft minecraft, int width, int height, int y, int defaultEntryHeight) -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected intprotected voidcenterScrollOn(E entry) protected intThe rows' total height.protected voidensureVisible(E entry) protected EentryAt(double x, double y) The row under a point, if any.protected Eprotected intintprotected intgetRowBottom(int index) intprotected intgetRowTop(int index) protected intintbooleanmouseClicked(double mouseX, double mouseY, int button) net.minecraft.client.gui.narration.NarratableEntry.NarrationPriorityprotected booleanremoveEntry(E entry) protected voidrenderListBackground(net.minecraft.client.gui.GuiGraphics graphics) protected voidrenderListSeparators(net.minecraft.client.gui.GuiGraphics graphics) protected voidrenderScrollbar(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) Vanilla's scrollbar, while the rows don't fit.voidrenderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTick) voidreplaceEntries(Collection<E> entries) protected voidPlaces every row under the one before it, for the current position and scroll.protected booleandoubleprotected intprotected intprotected intvoidsetClampedScrollAmount(double scroll) voidupdateSizeAndPosition(int width, int height, int y) voidupdateSizeAndPosition(int width, int height, int x, int y) Methods inherited from class net.minecraft.client.gui.components.ContainerObjectSelectionList
isSelectedItem, nextFocusPath, setFocused, updateWidgetNarrationMethods 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, updateSizeMethods inherited from class net.minecraft.client.gui.components.AbstractContainerWidget
isDragging, isFocused, setDragging, setFocusedMethods 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, 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, getChildAt, getCurrentFocusPath, keyPressed, keyReleasedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, mouseMovedMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods 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
- Overrides:
addEntryin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
addEntry
-
replaceEntries
- Overrides:
replaceEntriesin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
removeEntry
- Overrides:
removeEntryin classnet.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:
updateSizeAndPositionin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
getRowLeft
public int getRowLeft()- Overrides:
getRowLeftin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
getRowTop
protected int getRowTop(int index) - Overrides:
getRowTopin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
getRowBottom
protected int getRowBottom(int index) - Overrides:
getRowBottomin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
contentHeight
protected int contentHeight()The rows' total height. -
getMaxPosition
protected int getMaxPosition()- Overrides:
getMaxPositionin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
getMaxScroll
public int getMaxScroll()- Overrides:
getMaxScrollin classnet.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:
setClampedScrollAmountin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
scrollable
protected boolean scrollable() -
scrollBarX
protected int scrollBarX() -
getScrollbarPosition
protected int getScrollbarPosition()- Overrides:
getScrollbarPositionin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
scrollerHeight
protected int scrollerHeight() -
scrollBarY
protected int scrollBarY() -
ensureVisible
- Overrides:
ensureVisiblein classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
centerScrollOn
- Overrides:
centerScrollOnin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
entryAt
The row under a point, if any. -
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Specified by:
mouseClickedin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
mouseClickedin classnet.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:
renderWidgetin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
renderListBackground
protected void renderListBackground(net.minecraft.client.gui.GuiGraphics graphics) - Overrides:
renderListBackgroundin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
renderListSeparators
protected void renderListSeparators(net.minecraft.client.gui.GuiGraphics graphics) - Overrides:
renderListSeparatorsin classnet.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
- Overrides:
getHoveredin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
narrationPriority
public net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority narrationPriority()- Specified by:
narrationPriorityin interfacenet.minecraft.client.gui.narration.NarratableEntry- Overrides:
narrationPriorityin classnet.minecraft.client.gui.components.ContainerObjectSelectionList<E extends StyledList.Entry<E>>
-