Class ElementListWidget<E extends ElementListWidget.Entry<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>
  • 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 - true to cycle forwards, otherwise cycle backwards
      Returns:
      true to indicate that the event handling is successful/valid
    • isSelectedItem

      protected boolean isSelectedItem​(int index)
      Overrides:
      isSelectedItem in class EntryListWidget<E extends ElementListWidget.Entry<E>>