package sweetie.evaware.api.utils.render;
import net.minecraft.client.util.math.MatrixStack;
import java.awt.*;
public final class HudStyle {
private static final int OUTLINE_R = 90;
private static final int OUTLINE_G = 90;
private static final int OUTLINE_B = 90;
private static final int FILL_TOP_R = 52;
private static final int FILL_TOP_G = 52;
private static final int FILL_TOP_B = 52;
private static final int FILL_BOTTOM_R = 22;
private static final int FILL_BOTTOM_G = 22;
private static final int FILL_BOTTOM_B = 22;
private static final float INSET = 2f;
public static void drawBackground(MatrixStack matrixStack, float x, float y, float w, float h, float round, float alpha) {
int a = (int) (255 * Math.min(1f, Math.max(0f, alpha)));
Color outline = new Color(OUTLINE_R, OUTLINE_G, OUTLINE_B, a);
Color fillTop = new Color(FILL_TOP_R, FILL_TOP_G, FILL_TOP_B, a);
Color fillBottom = new Color(FILL_BOTTOM_R, FILL_BOTTOM_G, FILL_BOTTOM_B, a);
RenderUtil.RECT.draw(matrixStack, x, y, w, h, round, outline);
float in = INSET;
RenderUtil.GRADIENT_RECT.draw(matrixStack, x + in, y + in, w - in * 2f, h - in * 2f, Math.max(0f, round - in), fillTop, fillTop, fillBottom, fillBottom);
}
public static void drawBackground(MatrixStack matrixStack, float x, float y, float w, float h, float round) {
drawBackground(matrixStack, x, y, w, h, round, 1f);
}
}