@Environment(value=CLIENT) public class ButtonListWidget extends ElementListWidget<ButtonListWidget.ButtonEntry>
Modifier and Type | Class and Description |
---|---|
static class |
ButtonListWidget.ButtonEntry |
ElementListWidget.Entry<E extends ElementListWidget.Entry<E>>
EntryListWidget.Entries, EntryListWidget.MoveDirection
bottom, centerListVertically, client, headerHeight, height, itemHeight, left, right, top, width
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
ButtonListWidget(MinecraftClient client,
int width,
int height,
int top,
int bottom,
int itemHeight) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(Option[] options) |
void |
addOptionEntry(Option firstOption,
Option secondOption) |
int |
addSingleOptionEntry(Option option) |
AbstractButtonWidget |
getButtonFor(Option option) |
Optional<AbstractButtonWidget> |
getHoveredButton(double mouseX,
double mouseY) |
int |
getRowWidth() |
protected int |
getScrollbarPositionX() |
changeFocus, isSelectedItem
addEntry, centerScrollOn, children, clearEntries, clickedHeader, ensureVisible, getEntry, getEntryAtPosition, getFocused, getItemCount, getMaxPosition, getMaxScroll, getRowLeft, getRowTop, getScrollAmount, getSelected, isFocused, isMouseOver, keyPressed, method_30015, method_31322, method_31323, method_31383, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, moveSelection, moveSelectionIf, remove, removeEntry, render, renderBackground, renderDecorations, renderHeader, renderList, replaceEntries, setLeftPos, setRenderHeader, setRenderSelection, setScrollAmount, setSelected, updateScrollingState, updateSize
isDragging, setDragging, setFocused
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
charTyped, focusOn, hoveredElement, keyReleased, setInitialFocus
mouseMoved
public ButtonListWidget(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight)
public int addSingleOptionEntry(Option option)
public void addAll(Option[] options)
public int getRowWidth()
getRowWidth
in class EntryListWidget<ButtonListWidget.ButtonEntry>
protected int getScrollbarPositionX()
getScrollbarPositionX
in class EntryListWidget<ButtonListWidget.ButtonEntry>
@Nullable public AbstractButtonWidget getButtonFor(Option option)
public Optional<AbstractButtonWidget> getHoveredButton(double mouseX, double mouseY)