Class LytImage

All Implemented Interfaces:
InteractiveElement, Styleable

public class LytImage extends LytBlock implements InteractiveElement
  • Constructor Details

    • LytImage

      public LytImage()
  • Method Details

    • getImageId

      public net.minecraft.resources.Identifier getImageId()
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getAlt

      public String getAlt()
    • setAlt

      public void setAlt(String alt)
    • setImage

      public void setImage(net.minecraft.resources.Identifier id, byte @Nullable [] imageData)
    • computeLayout

      protected LytRect computeLayout(LayoutContext context, int x, int y, int availableWidth)
      Specified by:
      computeLayout in class LytBlock
    • onLayoutMoved

      protected void onLayoutMoved(int deltaX, int deltaY)
      Description copied from class: LytBlock
      Implement to react to layout previously computed by LytBlock.computeLayout(LayoutContext, int, int, int) being moved.
      Specified by:
      onLayoutMoved in class LytBlock
    • render

      public void render(RenderContext context)
      Specified by:
      render in class LytBlock
    • getTooltip

      public Optional<GuideTooltip> getTooltip(float x, float y)
      Specified by:
      getTooltip in interface InteractiveElement
      Parameters:
      x - X position of the mouse in document coordinates.
      y - Y position of the mouse in document coordinates.