Class ConfigStyle
java.lang.Object
net.ixdarklord.coolcatcore.internal.config.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 (its config cards).static voidbackground(net.minecraft.client.gui.GuiGraphics graphics, int width, int height, 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 voidblit(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 voidblit(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 voidblur(net.minecraft.client.gui.GuiGraphics graphics) The panorama or world behind a screen, blurred (also for the canvas's styled screens).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 (all of them for null) and GUI sprites' scaling, 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 voidenableScissor(net.minecraft.client.gui.GuiGraphics graphics, int x0, int y0, int x1, int y1) Clips drawing to a rectangle.static intmix(int from, int to, float t) static ConfigTheme.Modemode()Dark or light, as the player chose.static voidnextLayer(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 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 voidpanorama(float partialTick) Draws the title screen's panorama, as a menu shows it outside a world.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 voidsprite(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; seeGuiSprites.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 voidShows a tooltip at the mouse this frame, drawn by the current screen after everything else.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 (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 pixelsv- 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; seeGuiSprites. -
tooltip
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. UnlikeGuiGraphics.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 withGuiGraphics.disableScissor(). -
panorama
public static void panorama(float partialTick) Draws the title screen's panorama, as a menu shows it outside a world. -
blur
public static void blur(net.minecraft.client.gui.GuiGraphics graphics) The panorama or world behind a screen, blurred (also for the canvas's styled screens). -
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.
-