Class ModListScreen.InfoPanel

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement, NarratableEntry, NarrationSupplier
Enclosing class:
ModListScreen

class ModListScreen.InfoPanel extends ScrollPanel
  • Field Details

  • Constructor Details

    • InfoPanel

      InfoPanel(Minecraft mcIn, int widthIn, int heightIn, int topIn)
  • Method Details

    • setInfo

      void setInfo(List<String> lines, ResourceLocation logoPath, Size2i logoDims)
    • clearInfo

      void clearInfo()
    • resizeContent

      private List<FormattedCharSequence> resizeContent(List<String> lines)
    • getContentHeight

      public int getContentHeight()
      Specified by:
      getContentHeight in class ScrollPanel
    • getScrollAmount

      protected int getScrollAmount()
      Overrides:
      getScrollAmount in class ScrollPanel
    • drawPanel

      protected void drawPanel(GuiGraphics guiGraphics, int entryRight, int relativeY, Tesselator tess, int mouseX, int mouseY)
      Description copied from class: ScrollPanel
      Draw anything special on the screen. Scissor (RenderSystem.enableScissor) is enabled for anything that is rendered outside the view box. Do not mess with Scissor unless you support this.
      Specified by:
      drawPanel in class ScrollPanel
    • findTextLine

      private Style findTextLine(int mouseX, int mouseY)
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
      Description copied from interface: ContainerEventHandler
      Called when a mouse button is clicked within the GUI element.

      Specified by:
      mouseClicked in interface ContainerEventHandler
      Specified by:
      mouseClicked in interface GuiEventListener
      Overrides:
      mouseClicked in class ScrollPanel
      Parameters:
      mouseX - the X coordinate of the mouse.
      mouseY - the Y coordinate of the mouse.
      button - the button that was clicked.
      Returns:
      true if the event is consumed, false otherwise.
    • narrationPriority

      public NarratableEntry.NarrationPriority narrationPriority()
    • updateNarration

      public void updateNarration(NarrationElementOutput p_169152_)
      Description copied from interface: NarrationSupplier
      Updates the narration output with the current narration information.
      Parameters:
      p_169152_ - the output to update with narration information.