Class ConfigStyle
java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.gui.style.ConfigStyle
-
Method Summary
Modifier and TypeMethodDescriptionstatic intaccent()static intaccentOf(ConfigTheme other) Another theme's accent in the current mode, for things drawn in a mod's own color.static voidbackground(net.minecraft.client.gui.GuiGraphics graphics, int width, int height, float partialTick, Runnable panorama) The theme's background.static intbadge(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 voidbar(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height) static voidcenteredText(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 voidclearTextureCache(@Nullable net.minecraft.resources.ResourceLocation texture) Forgets texture sizes, after resources reload.static ConfigColorSchemecolors()The current theme's colors.static net.minecraft.util.FormattedCharSequenceellipsize(net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component text, int width) static intmix(int from, int to, float t) static ConfigTheme.Modemode()Dark or light, as the player chose.static voidoutline(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color) static voidpanel(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 intreadableOn(int color) Dark text on light colors, light text on dark ones.static voidrect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color) static voidtext(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 ConfigThemetheme()static voiduse(ConfigTheme newTheme) Makes a theme the one widgets draw with; screens set theirs before drawing.static intwithAlpha(int color, int alpha)
-
Method Details
-
use
Makes a theme the one widgets draw with; screens set theirs before drawing. -
theme
-
colors
The current theme's colors. -
mode
Dark or light, as the player chose. -
accentOf
Another theme's accent in the current mode, for things drawn in a mod's own color. -
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) -
background
public static void background(net.minecraft.client.gui.GuiGraphics graphics, int width, int height, float partialTick, 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.ResourceLocation texture) -
clearTextureCache
public static void clearTextureCache(@Nullable @Nullable net.minecraft.resources.ResourceLocation texture) Forgets texture sizes, after resources reload.
-