Package net.minecraft.client.gui.widget
Class ElementListWidget<E extends ElementListWidget.Entry<E>>
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.widget.EntryListWidget<E>
net.minecraft.client.gui.widget.ElementListWidget<E>
- All Implemented Interfaces:
Drawable,Element,ParentElement
- Direct Known Subclasses:
ButtonListWidget,ControlsListWidget,EditGameRulesScreen.RuleListWidget,SocialInteractionsPlayerListWidget
@Environment(CLIENT) public abstract class ElementListWidget<E extends ElementListWidget.Entry<E>> extends EntryListWidget<E>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classElementListWidget.Entry<E extends ElementListWidget.Entry<E>>Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.EntryListWidget
EntryListWidget.Entries, EntryListWidget.MoveDirection -
Field Summary
Fields inherited from class net.minecraft.client.gui.widget.EntryListWidget
bottom, centerListVertically, client, headerHeight, height, itemHeight, left, right, top, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description ElementListWidget(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight) -
Method Summary
Modifier and Type Method Description booleanchangeFocus(boolean lookForwards)Changes the focusing element by cycling to the next/previous element.protected booleanisSelectedEntry(int index)Methods inherited from class net.minecraft.client.gui.widget.EntryListWidget
addEntry, centerScrollOn, children, clearEntries, clickedHeader, ensureSelectedEntryVisible, ensureVisible, getEntry, getEntryAtPosition, getEntryCount, getFocused, getMaxPosition, getMaxScroll, getRowLeft, getRowRight, getRowTop, getRowWidth, getScrollAmount, getScrollbarPositionX, getSelected, isFocused, isMouseOver, keyPressed, method_31322, method_31323, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, moveSelection, moveSelectionIf, remove, removeEntry, render, renderBackground, renderDecorations, renderHeader, renderList, replaceEntries, setLeftPos, setRenderHeader, setRenderSelection, setScrollAmount, setSelected, updateScrollingState, updateSizeMethods inherited from class net.minecraft.client.gui.AbstractParentElement
isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
charTyped, focusOn, hoveredElement, keyReleased, setInitialFocus
-
Constructor Details
-
ElementListWidget
public ElementListWidget(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight)
-
-
Method Details
-
changeFocus
public boolean changeFocus(boolean lookForwards)Changes the focusing element by cycling to the next/previous element. This action is done typically when the user has pressed the 'Tab' or 'Ctrl+Tab' key.- Parameters:
lookForwards-trueto cycle forwards, otherwise cycle backwards- Returns:
trueto indicate that the event handling is successful/valid
-
isSelectedEntry
protected boolean isSelectedEntry(int index)- Overrides:
isSelectedEntryin classEntryListWidget<E extends ElementListWidget.Entry<E>>
-