@Environment(value=CLIENT) public class ControlsListWidget.CategoryEntry extends ControlsListWidget.Entry
| Modifier and Type | Field and Description |
|---|---|
private Text |
text |
private int |
textWidth |
| Constructor and Description |
|---|
CategoryEntry(Text text) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeFocus(boolean lookForwards)
Changes the focusing element by cycling to the next/previous element.
|
List<? extends Element> |
children()
Gets a list of all child GUI elements.
|
void |
render(MatrixStack matrices,
int index,
int y,
int x,
int entryWidth,
int entryHeight,
int mouseX,
int mouseY,
boolean hovered,
float tickDelta)
Renders an entry in a list.
|
getFocused, isDragging, setDragging, setFocusedisMouseOverclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcharTyped, focusOn, hoveredElement, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocusisMouseOver, mouseMovedprivate final Text text
private final int textWidth
public CategoryEntry(Text text)
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta)
render in class EntryListWidget.Entry<ControlsListWidget.Entry>matrices - the matrix stack used for renderingindex - the index of the entryy - the Y coordinate of the entryx - the X coordinate of the entryentryWidth - the width of the entryentryHeight - the height of the entrymouseX - the X coordinate of the mousemouseY - the Y coordinate of the mousehovered - whether the mouse is hovering over the entrypublic boolean changeFocus(boolean lookForwards)
lookForwards - true to cycle forwards, otherwise cycle backwardstrue to indicate that the event handling is successful/valid