Package net.createmod.catnip.gui
Class UIRenderHelper
java.lang.Object
net.createmod.catnip.gui.UIRenderHelper
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ColorAn FBO that has a stencil buffer for use wherever stencil are necessary. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidangledGradient(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, float breadth, float length, Couple<Color> c) static voidangledGradient(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, float breadth, float length, Color color1, Color color2) static voidangledGradient(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, int z, float breadth, float length, Couple<Color> c) static voidangledGradient(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, int z, float breadth, float length, Color startColor, Color endColor) x and y specify the middle point of the starting edgestatic voidbreadcrumbArrow(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int z, int width, int height, int indent, Couple<Color> colors) static voidbreadcrumbArrow(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int z, int width, int height, int indent, Color startColor, Color endColor) static voiddrawColoredTexture(net.minecraft.client.gui.GuiGraphics graphics, Color c, int x, int y, int z, float tex_left, float tex_top, int width, int height, int sheet_width, int sheet_height) static voiddrawColoredTexture(net.minecraft.client.gui.GuiGraphics graphics, Color c, int x, int y, int tex_left, int tex_top, int width, int height) static voiddrawCropped(net.minecraft.client.gui.GuiGraphics graphics, int left, int top, int w, int h, int z, TextureSheetSegment tex) static voiddrawFramebuffer(com.mojang.blaze3d.vertex.PoseStack poseStack, float alpha) static voiddrawGradientRect(org.joml.Matrix4f mat, int zLevel, float left, float top, float right, float bottom, Color startColor, Color endColor) static voiddrawRadialSector(net.minecraft.client.gui.GuiGraphics graphics, float innerRadius, float outerRadius, float startAngle, float arcAngle, Color innerColor, Color outerColor) centered on 0, 0static voiddrawStretched(net.minecraft.client.gui.GuiGraphics graphics, int left, int top, int w, int h, int z, TextureSheetSegment tex) static voidflipForGuiRender(com.mojang.blaze3d.vertex.PoseStack poseStack) static voidinit()static voidstreak(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, int breadth, int length) static voidstreak(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, int breadth, int length, Color c) static voidswapAndBlitColor(com.mojang.blaze3d.pipeline.RenderTarget src, com.mojang.blaze3d.pipeline.RenderTarget dst) Switch from src to dst, after copying the contents of src to dst.static voidupdateWindowSize(com.mojang.blaze3d.platform.Window mainWindow)
-
Field Details
-
COLOR_TEXT
-
COLOR_TEXT_DARKER
-
COLOR_TEXT_ACCENT
-
COLOR_TEXT_STRONG_ACCENT
-
COLOR_STREAK
-
framebuffer
An FBO that has a stencil buffer for use wherever stencil are necessary. Forcing the main FBO to have a stencil buffer will cause GL error spam when using fabulous graphics.
-
-
Constructor Details
-
UIRenderHelper
public UIRenderHelper()
-
-
Method Details
-
init
public static void init() -
updateWindowSize
public static void updateWindowSize(com.mojang.blaze3d.platform.Window mainWindow) -
drawFramebuffer
public static void drawFramebuffer(com.mojang.blaze3d.vertex.PoseStack poseStack, float alpha) -
swapAndBlitColor
public static void swapAndBlitColor(com.mojang.blaze3d.pipeline.RenderTarget src, com.mojang.blaze3d.pipeline.RenderTarget dst) Switch from src to dst, after copying the contents of src to dst. -
streak
public static void streak(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, int breadth, int length) - Parameters:
angle- angle in degrees, 0 means fading to the rightx- x-position of the starting edge middle pointy- y-position of the starting edge middle pointbreadth- total width of the streaklength- total length of the streak
-
streak
public static void streak(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, int breadth, int length, Color c) -
angledGradient
public static void angledGradient(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, float breadth, float length, Couple<Color> c) - See Also:
-
angledGradient
public static void angledGradient(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, int z, float breadth, float length, Couple<Color> c) - See Also:
-
angledGradient
public static void angledGradient(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, float breadth, float length, Color color1, Color color2) - See Also:
-
angledGradient
public static void angledGradient(net.minecraft.client.gui.GuiGraphics graphics, float angle, int x, int y, int z, float breadth, float length, Color startColor, Color endColor) x and y specify the middle point of the starting edge- Parameters:
angle- the angle of the gradient in degrees; 0° means from left to rightbreadth- the total width of the gradientstartColor- the color at the starting edgeendColor- the color at the ending edge
-
drawGradientRect
-
breadcrumbArrow
-
breadcrumbArrow
-
drawRadialSector
public static void drawRadialSector(net.minecraft.client.gui.GuiGraphics graphics, float innerRadius, float outerRadius, float startAngle, float arcAngle, Color innerColor, Color outerColor) centered on 0, 0- Parameters:
arcAngle- length of the sector arc
-
drawColoredTexture
public static void drawColoredTexture(net.minecraft.client.gui.GuiGraphics graphics, Color c, int x, int y, int tex_left, int tex_top, int width, int height) -
drawColoredTexture
public static void drawColoredTexture(net.minecraft.client.gui.GuiGraphics graphics, Color c, int x, int y, int z, float tex_left, float tex_top, int width, int height, int sheet_width, int sheet_height) -
drawStretched
public static void drawStretched(net.minecraft.client.gui.GuiGraphics graphics, int left, int top, int w, int h, int z, TextureSheetSegment tex) -
drawCropped
public static void drawCropped(net.minecraft.client.gui.GuiGraphics graphics, int left, int top, int w, int h, int z, TextureSheetSegment tex) -
flipForGuiRender
public static void flipForGuiRender(com.mojang.blaze3d.vertex.PoseStack poseStack)
-