Interface IGuiGraphicsExtension

All Known Implementing Classes:
GuiGraphics

public interface IGuiGraphicsExtension
Extension interface for GuiGraphics.
  • Field Details

  • Method Details

    • self

      private GuiGraphics self()
    • getColorFromFormattingCharacter

      default int getColorFromFormattingCharacter(char c, boolean isLighter)
    • drawScrollingString

      default int drawScrollingString(Font font, Component text, int minX, int maxX, int y, int color)
      Draws a left-aligned string, with a scrolling effect if the string is too long.
      Returns:
      the rendered width of the string, never more than maxX - minX
    • blitInscribed

      default void blitInscribed(ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight)
      Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler.
      Parameters:
      texture - the ResourceLocation object that contains the desired image
      x - x-axis offset
      y - y-axis offset
      u - bound resource location image x offset
      v - bound resource location image y offset
      width - the desired box width
      height - the desired box height
      textureWidth - the width of the box texture in the resource location image
      textureHeight - the height of the box texture in the resource location image
      topBorder - the size of the box's top border
      bottomBorder - the size of the box's bottom border
      leftBorder - the size of the box's left border
      rightBorder - the size of the box's right border
    • blitInscribed

      default void blitInscribed(ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight, boolean centerX, boolean centerY)