Class ConfigStyle

java.lang.Object
net.ixdarklord.coolcatcanvas.internal.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.GuiGraphicsExtractor graphics, int width, int height, Runnable panorama)
    The theme's background.
    static int
    badge(net.minecraft.client.gui.GuiGraphicsExtractor 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.GuiGraphicsExtractor graphics, int x, int y, int width, int height)
     
    static void
    centeredText(net.minecraft.client.gui.GuiGraphicsExtractor 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.Identifier texture)
    Forgets texture sizes, 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 int
    mix(int from, int to, float t)
     
    Dark or light, as the player chose.
    static void
    outline(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int width, int height, int color)
     
    static void
    panel(net.minecraft.client.gui.GuiGraphicsExtractor 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 int
    readableOn(int color)
    Dark text on light colors, light text on dark ones.
    static void
    rect(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int x, int y, int width, int height, int color)
     
    static void
    text(net.minecraft.client.gui.GuiGraphicsExtractor 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.Identifier texture)
     
     
    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 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.GuiGraphicsExtractor graphics, int x, int y, int width, int height, int color)
    • outline

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

      public static void panel(net.minecraft.client.gui.GuiGraphicsExtractor 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.GuiGraphicsExtractor graphics, int x, int y, int width, int height)
    • badge

      public static int badge(net.minecraft.client.gui.GuiGraphicsExtractor 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.GuiGraphicsExtractor 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.GuiGraphicsExtractor 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)
    • background

      public static void background(net.minecraft.client.gui.GuiGraphicsExtractor 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.
      Parameters:
      panorama - draws the title screen's panorama
    • textureSize

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

      public static void clearTextureCache(@Nullable @Nullable net.minecraft.resources.Identifier texture)
      Forgets texture sizes, after resources reload.