Class StyledList<E extends StyledList.Entry<E>>
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 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, height, itemHeight, minecraft, width, x0, x1, y0, y1Fields 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 voidenableScissor(net.minecraft.client.gui.GuiGraphics graphics) protected voidensureVisible(E entry) protected EentryAt(double x, double y) The row under a point, if any.intintprotected Eprotected intintnet.minecraft.client.gui.navigation.ScreenRectangleintgetRight()protected intgetRowBottom(int index) intprotected intgetRowTop(int index) protected intintgetWidth()intgetX()intgetY()booleanisMouseOver(double mouseX, double mouseY) intbooleanmouseClicked(double mouseX, double mouseY, int button) net.minecraft.client.gui.narration.NarratableEntry.NarrationPriorityprotected booleanremoveEntry(E entry) voidrender(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTick) protected voidrenderScrollbar(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.voidreplaceEntries(Collection<E> entries) protected voidPlaces every row under the one before it, for the current position and scroll.protected booleandoubleprotected intprotected intprotected intvoidsetPosition(int x, int y) voidsetScrollAmount(double scroll) voidsetSize(int width, int height) 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, updateNarrationMethods 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, updateSizeMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
isDragging, setDraggingMethods 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, isFocused, keyPressed, keyReleased, magicalSpecialHackyFocus, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
isActiveMethods 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:
getRectanglein interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
getRectanglein classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
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. -
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() -
setScrollAmount
public void setScrollAmount(double scroll) - Overrides:
setScrollAmountin 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>>
-
isMouseOver
public boolean isMouseOver(double mouseX, double mouseY) - Specified by:
isMouseOverin interfacenet.minecraft.client.gui.components.events.GuiEventListener- Overrides:
isMouseOverin classnet.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:
renderin interfacenet.minecraft.client.gui.components.Renderable- Overrides:
renderin classnet.minecraft.client.gui.components.AbstractSelectionList<E extends StyledList.Entry<E>>
-
enableScissor
protected void enableScissor(net.minecraft.client.gui.GuiGraphics graphics) - Overrides:
enableScissorin 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) A plain scrollbar, as vanilla's lists draw it, 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>>
-