java.lang.Object
net.ixdarklord.coolcatcore.internal.config.client.gui.style.ConfigStyle

public final class ConfigStyle extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
     
    static int
    Another theme's accent in the current mode, for things drawn in a mod's own color (its config cards).
    static void
    background(net.minecraft.client.gui.GuiGraphics graphics, int width, int height, Runnable panorama)
    The theme's background.
    static int
    badge(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int x, int y, int color)
    A small label with a colored border, like a tag.
    static void
    bar(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height)
     
    static void
    blit(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, float u, float v, int width, int height, int regionWidth, int regionHeight, int textureWidth, int textureHeight)
     
    static void
    blit(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, float u, float v, int width, int height, int regionWidth, int regionHeight, int textureWidth, int textureHeight, int color)
    Draws a region of a texture stretched over a rectangle, tinted and faded by an ARGB color.
    static void
    centeredText(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int centerX, int y, int maxWidth, int color)
     
    static void
    clearTextureCache(@Nullable net.minecraft.resources.ResourceLocation texture)
    Forgets texture sizes (all of them for null) and GUI sprites' scaling, after resources reload.
    The current theme's colors.
    static net.minecraft.util.FormattedCharSequence
    ellipsize(net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int width)
     
    static void
    enableScissor(net.minecraft.client.gui.GuiGraphics graphics, int x0, int y0, int x1, int y1)
    Clips drawing to a rectangle.
    static int
    mix(int from, int to, float t)
     
    Dark or light, as the player chose.
    static void
    nextLayer(net.minecraft.client.gui.GuiGraphics graphics)
    Starts a new layer: what's drawn next covers everything drawn so far, whatever its depth, as a screen drawn over another must.
    static void
    outline(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color)
     
    static void
    panel(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height)
    A translucent panel with a hairline border and a faint accent sheen along its top.
    static void
    panorama(float partialTick)
    Draws the title screen's panorama, as a menu shows it outside a world.
    static int
    readableOn(int color)
    Dark text on light colors, light text on dark ones.
    static void
    rect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color)
     
    static void
    sprite(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation sprite, int x, int y, int width, int height)
    Draws a GUI sprite (a sprite id, or a texture path), scaled as its .mcmeta says; see GuiSprites.
    static void
    text(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int x, int y, int maxWidth, int color)
     
    static int[]
    textureSize(net.minecraft.resources.ResourceLocation texture)
     
     
    static void
    tooltip(List<net.minecraft.util.FormattedCharSequence> lines)
    Shows a tooltip at the mouse this frame, drawn by the current screen after everything else.
    static void
    use(ConfigTheme newTheme)
    Makes a theme the one widgets draw with; screens set theirs before drawing.
    static int
    withAlpha(int color, int alpha)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • use

      public static void use(ConfigTheme newTheme)
      Makes a theme the one widgets draw with; screens set theirs before drawing.
    • theme

      public static ConfigTheme theme()
    • colors

      public static ConfigColorScheme colors()
      The current theme's colors.
    • mode

      public static ConfigTheme.Mode mode()
      Dark or light, as the player chose.
    • accentOf

      public static int accentOf(ConfigTheme other)
      Another theme's accent in the current mode, for things drawn in a mod's own color (its config cards).
    • accent

      public static int accent()
    • withAlpha

      public static int withAlpha(int color, int alpha)
    • mix

      public static int mix(int from, int to, float t)
    • readableOn

      public static int readableOn(int color)
      Dark text on light colors, light text on dark ones.
    • rect

      public static void rect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color)
    • outline

      public static void outline(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color)
    • panel

      public static void panel(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height)
      A translucent panel with a hairline border and a faint accent sheen along its top.
    • bar

      public static void bar(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height)
    • badge

      public static int badge(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int x, int y, int color)
      A small label with a colored border, like a tag.
    • text

      public static void text(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int x, int y, int maxWidth, int color)
    • centeredText

      public static void centeredText(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int centerX, int y, int maxWidth, int color)
    • ellipsize

      public static net.minecraft.util.FormattedCharSequence ellipsize(net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int width)
    • blit

      public static void blit(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, float u, float v, int width, int height, int regionWidth, int regionHeight, int textureWidth, int textureHeight, int color)
      Draws a region of a texture stretched over a rectangle, tinted and faded by an ARGB color.
      Parameters:
      u - the region's left in the texture, in pixels
      v - the region's top
    • blit

      public static void blit(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, float u, float v, int width, int height, int regionWidth, int regionHeight, int textureWidth, int textureHeight)
    • sprite

      public static void sprite(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation sprite, int x, int y, int width, int height)
      Draws a GUI sprite (a sprite id, or a texture path), scaled as its .mcmeta says; see GuiSprites.
    • tooltip

      public static void tooltip(List<net.minecraft.util.FormattedCharSequence> lines)
      Shows a tooltip at the mouse this frame, drawn by the current screen after everything else.
    • nextLayer

      public static void nextLayer(net.minecraft.client.gui.GuiGraphics graphics)
      Starts a new layer: what's drawn next covers everything drawn so far, whatever its depth, as a screen drawn over another must.
    • enableScissor

      public static void enableScissor(net.minecraft.client.gui.GuiGraphics graphics, int x0, int y0, int x1, int y1)
      Clips drawing to a rectangle. Unlike GuiGraphics.enableScissor(int, int, int, int), the rectangle moves with the pose (a page sliding in, a card growing), as it does on newer versions. End it with GuiGraphics.disableScissor().
    • panorama

      public static void panorama(float partialTick)
      Draws the title screen's panorama, as a menu shows it outside a world.
    • background

      public static void background(net.minecraft.client.gui.GuiGraphics graphics, int width, int height, Runnable panorama)
      The theme's background. By default it's see-through: the title screen's panorama, or the world while playing, blurred and darkened by the backdrop color so the panels stay readable. A theme's texture is drawn over it (in a world only when the theme asks), fully covering it unless the texture is translucent. The theme's opacities are scaled by the player's own choice in CoolCatLib's client config.
      Parameters:
      panorama - draws the title screen's panorama
    • textureSize

      public static int[] textureSize(net.minecraft.resources.ResourceLocation texture)
    • clearTextureCache

      public static void clearTextureCache(@Nullable @Nullable net.minecraft.resources.ResourceLocation texture)
      Forgets texture sizes (all of them for null) and GUI sprites' scaling, after resources reload.