@Environment(value=CLIENT) public abstract class EntryListWidget<E extends EntryListWidget.Entry<E>> extends AbstractParentElement implements Drawable
| Modifier and Type | Class and Description |
|---|---|
static class |
EntryListWidget.class_5403 |
(package private) class |
EntryListWidget.Entries |
static class |
EntryListWidget.Entry<E extends EntryListWidget.Entry<E>> |
| Modifier and Type | Field and Description |
|---|---|
protected int |
bottom |
protected boolean |
centerListVertically |
private List<E> |
children |
protected MinecraftClient |
client |
protected int |
headerHeight |
protected int |
height |
protected int |
itemHeight |
protected int |
left |
private boolean |
renderHeader |
private boolean |
renderSelection |
protected int |
right |
private double |
scrollAmount |
private boolean |
scrolling |
private E |
selected |
protected int |
top |
protected int |
width |
BACKGROUND_TEXTURE, GUI_ICONS_TEXTURE, STATS_ICON_TEXTURE| Constructor and Description |
|---|
EntryListWidget(MinecraftClient client,
int width,
int height,
int top,
int bottom,
int itemHeight) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
addEntry(E entry) |
protected void |
centerScrollOn(E entry) |
List<E> |
children() |
protected void |
clearEntries() |
protected void |
clickedHeader(int x,
int y) |
protected void |
ensureVisible(E entry) |
protected E |
getEntry(int index) |
protected E |
getEntryAtPosition(double x,
double y) |
E |
getFocused() |
protected int |
getItemCount() |
protected int |
getMaxPosition() |
private int |
getMaxScroll() |
private int |
getRowBottom(int index) |
protected int |
getRowLeft() |
protected int |
getRowTop(int index) |
int |
getRowWidth() |
double |
getScrollAmount() |
protected int |
getScrollbarPositionX() |
E |
getSelected() |
protected boolean |
isFocused() |
boolean |
isMouseOver(double mouseX,
double mouseY) |
protected boolean |
isSelectedItem(int index) |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers) |
void |
method_29344(boolean bool) |
private void |
method_29621(EntryListWidget.Entry<E> entry) |
protected void |
method_30013(EntryListWidget.class_5403 class_5403,
Predicate<E> predicate) |
protected void |
method_30015() |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button) |
boolean |
mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY) |
boolean |
mouseReleased(double mouseX,
double mouseY,
int button) |
boolean |
mouseScrolled(double mouseX,
double mouseY,
double amount) |
protected void |
moveSelection(EntryListWidget.class_5403 class_5403) |
protected E |
remove(int index) |
protected boolean |
removeEntry(E entry) |
void |
render(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
protected void |
renderBackground(MatrixStack matrices) |
protected void |
renderDecorations(MatrixStack matrixStack,
int int2,
int int3) |
protected void |
renderHeader(MatrixStack matrices,
int x,
int y,
Tessellator tessellator) |
protected void |
renderList(MatrixStack matrixStack,
int int2,
int int3,
int int4,
int int5,
float float2) |
protected void |
replaceEntries(Collection<E> newEntries) |
private void |
scroll(int amount) |
void |
setLeftPos(int left) |
protected void |
setRenderHeader(boolean renderHeader,
int headerHeight) |
void |
setScrollAmount(double amount) |
void |
setSelected(E entry) |
protected void |
updateScrollingState(double mouseX,
double mouseY,
int button) |
void |
updateSize(int width,
int height,
int top,
int bottom) |
isDragging, setDragging, setFocuseddrawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeFocus, charTyped, focusOn, hoveredElement, keyReleased, setInitialFocusmouseMovedprotected final MinecraftClient client
protected final int itemHeight
private final List<E extends EntryListWidget.Entry<E>> children
protected int width
protected int height
protected int top
protected int bottom
protected int right
protected int left
protected boolean centerListVertically
private double scrollAmount
private boolean renderSelection
private boolean renderHeader
protected int headerHeight
private boolean scrolling
private E extends EntryListWidget.Entry<E> selected
public EntryListWidget(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight)
public void method_29344(boolean bool)
protected void setRenderHeader(boolean renderHeader,
int headerHeight)
public int getRowWidth()
@Nullable public E getFocused()
getFocused in interface ParentElementgetFocused in class AbstractParentElementpublic final List<E> children()
children in interface ParentElementprotected final void clearEntries()
protected void replaceEntries(Collection<E> newEntries)
protected E getEntry(int index)
protected int addEntry(E entry)
protected int getItemCount()
protected boolean isSelectedItem(int index)
public void updateSize(int width,
int height,
int top,
int bottom)
public void setLeftPos(int left)
protected int getMaxPosition()
protected void clickedHeader(int x,
int y)
protected void renderHeader(MatrixStack matrices, int x, int y, Tessellator tessellator)
protected void renderBackground(MatrixStack matrices)
protected void renderDecorations(MatrixStack matrixStack, int int2, int int3)
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta)
protected void centerScrollOn(E entry)
protected void ensureVisible(E entry)
private void scroll(int amount)
public double getScrollAmount()
public void setScrollAmount(double amount)
private int getMaxScroll()
protected void updateScrollingState(double mouseX,
double mouseY,
int button)
protected int getScrollbarPositionX()
public boolean mouseClicked(double mouseX,
double mouseY,
int button)
mouseClicked in interface ElementmouseClicked in interface ParentElementpublic boolean mouseReleased(double mouseX,
double mouseY,
int button)
mouseReleased in interface ElementmouseReleased in interface ParentElementpublic boolean mouseDragged(double mouseX,
double mouseY,
int button,
double deltaX,
double deltaY)
mouseDragged in interface ElementmouseDragged in interface ParentElementpublic boolean mouseScrolled(double mouseX,
double mouseY,
double amount)
mouseScrolled in interface ElementmouseScrolled in interface ParentElementpublic boolean keyPressed(int keyCode,
int scanCode,
int modifiers)
keyPressed in interface ElementkeyPressed in interface ParentElementprotected void moveSelection(EntryListWidget.class_5403 class_5403)
protected void method_30015()
protected void method_30013(EntryListWidget.class_5403 class_5403, Predicate<E> predicate)
public boolean isMouseOver(double mouseX,
double mouseY)
isMouseOver in interface Elementprotected void renderList(MatrixStack matrixStack, int int2, int int3, int int4, int int5, float float2)
protected int getRowLeft()
protected int getRowTop(int index)
private int getRowBottom(int index)
protected boolean isFocused()
protected E remove(int index)
protected boolean removeEntry(E entry)
private void method_29621(EntryListWidget.Entry<E> entry)