Class ModListScreen.InfoPanel

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.neoforged.neoforge.client.gui.widget.ScrollPanel
net.neoforged.neoforge.client.gui.ModListScreen.InfoPanel
All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier
Enclosing class:
ModListScreen

class ModListScreen.InfoPanel extends ScrollPanel
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private List<net.minecraft.util.FormattedCharSequence>
     
    private Size2i
     
    private net.minecraft.resources.ResourceLocation
     

    Fields inherited from class net.neoforged.neoforge.client.gui.widget.ScrollPanel

    border, bottom, captureMouse, height, left, right, scrollDistance, top, width

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    InfoPanel(net.minecraft.client.Minecraft mcIn, int widthIn, int heightIn, int topIn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
     
    protected void
    drawPanel(net.minecraft.client.gui.GuiGraphics guiGraphics, int entryRight, int relativeY, int mouseX, int mouseY)
    Draw anything special on the screen.
    private net.minecraft.network.chat.Style
    findTextLine(int mouseX, int mouseY)
     
    int
     
    protected int
     
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
     
    private List<net.minecraft.util.FormattedCharSequence>
     
    (package private) void
    setInfo(List<String> lines, net.minecraft.resources.ResourceLocation logoPath, Size2i logoDims)
     
    void
    updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_169152_)
     

    Methods inherited from class net.neoforged.neoforge.client.gui.widget.ScrollPanel

    children, clickPanel, drawBackground, drawGradientRect, isMouseOver, mouseDragged, mouseReleased, mouseScrolled, render

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    charTyped, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, nextFocusPath, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    getBorderForArrowNavigation, getRectangle, mouseMoved

    Methods inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    getNarratables, isActive

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Field Details

    • logoPath

      private net.minecraft.resources.ResourceLocation logoPath
    • logoDims

      private Size2i logoDims
    • lines

      private List<net.minecraft.util.FormattedCharSequence> lines
  • Constructor Details

    • InfoPanel

      InfoPanel(net.minecraft.client.Minecraft mcIn, int widthIn, int heightIn, int topIn)
  • Method Details

    • setInfo

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

      void clearInfo()
    • resizeContent

      private List<net.minecraft.util.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(net.minecraft.client.gui.GuiGraphics guiGraphics, int entryRight, int relativeY, 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 net.minecraft.network.chat.Style findTextLine(int mouseX, int mouseY)
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.ContainerEventHandler
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseClicked in class ScrollPanel
    • narrationPriority

      public net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority narrationPriority()
    • updateNarration

      public void updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_169152_)