Class ClauseListScreen

java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
com.pixelmonmod.pixelmon.client.gui.widgets.SlotBase
com.pixelmonmod.pixelmon.client.gui.battles.rules.ClauseListScreen
All Implemented Interfaces:
net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier

public class ClauseListScreen extends SlotBase
A list of battle clauses.
  • Constructor Details

    • ClauseListScreen

      public ClauseListScreen(BattleRulesBaseScreen parent, List<BattleClause> clauses, int top, int left, int width, int height)
      Initializes a clause list.
      Parameters:
      clauses - The clauses in the list.
      top - The y coordinate of the top of the list.
      left - The x coordinate of the left side of the list.
      width - The width of the list.
      height - The height of the list.
  • Method Details

    • getSize

      protected int getSize()
      Specified by:
      getSize in class SlotBase
    • elementClicked

      protected void elementClicked(int index, boolean doubleClicked)
      Specified by:
      elementClicked in class SlotBase
    • isSelected

      protected boolean isSelected(int element)
      Specified by:
      isSelected in class SlotBase
    • drawSlot

      protected void drawSlot(net.minecraft.client.gui.GuiGraphics graphics, int index, int x, int yTop, int yMiddle)
      Specified by:
      drawSlot in class SlotBase
    • get1Color

      protected float[] get1Color()
      Specified by:
      get1Color in class SlotBase
    • getSelectionColor

      protected Color getSelectionColor()
      Overrides:
      getSelectionColor in class SlotBase
    • getElement

      public BattleClause getElement(int index)
      Gets the clauses at a certain index in the list.
      Parameters:
      index - The index of the clause.
      Returns:
      The clause at the specified list index.
    • updateWidgetNarration

      protected void updateWidgetNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_259858_)
      Specified by:
      updateWidgetNarration in class net.minecraft.client.gui.components.AbstractWidget