private void waterMark(final MatrixStack stack) {
UserProfile profile = Manager.USER_PROFILE;
StringBuilder titleText = new StringBuilder();
int counter = 0; // Переменная для подсчета элементов
titleText.append("sigma client");
counter++;
if (watermarkElement.get(0)) {
if (counter > 0) {
titleText.append(TextFormatting.GRAY + " | " + TextFormatting.WHITE);
}
titleText.append("user");
counter++;
}
if (watermarkElement.get(1)) {
if (counter > 0) {
titleText.append(TextFormatting.GRAY + " | " + TextFormatting.WHITE);
}
titleText.append(mc.debugFPS + " fps");
counter++;
}
if (watermarkElement.get(2)) {
if (counter > 0) {
titleText.append(TextFormatting.GRAY + " | " + TextFormatting.WHITE);
}
titleText.append(HudUtil.calculatePing() + " ping");
}
// font.drawString(stack, module.name, x + 2.4, y + yOffset + font.getFontHeight() / 2f - 1.5f, secondColor);
// Координаты ватермки
final float x = 5, y = 5, titleWidth = Fonts.sf_medium[15].getWidth(titleText.toString()) + 6, titleHeight = 15;
int firstColor = ColorUtil.getColorStyle(0);
int secondColor = ColorUtil.getColorStyle(90);
int firstColor2 = ColorUtil.getColorStyle(180);
int secondColor2 = ColorUtil.getColorStyle(270);
RenderUtil.Render2D.drawShadow(x,y,titleWidth,titleHeight,5,firstColor,secondColor,firstColor2,secondColor2);
RenderUtil.Render2D.drawRoundedRect(x, y, titleWidth, titleHeight, 2.9f,ColorUtil.rgba(15, 15, 15, 205));
// RenderUtil.Render2D.drawRoundedRect(x, y, titleWidth, titleHeight, 4f, ColorUtil.rgba(15, 15, 15, 205));
Fonts.sf_medium[15].drawString(stack, titleText.toString(), x + 3, y + Fonts.sf_medium[15].getFontHeight() / 2f + 0.5f, -1);
}