package im.expensive.ui.display.impl;
import com.mojang.blaze3d.matrix.MatrixStack;
import im.expensive.Expensive;
import im.expensive.events.EventDisplay;
import im.expensive.ui.display.ElementRenderer;
import im.expensive.ui.styles.Style;
import im.expensive.utils.render.ColorUtils;
import im.expensive.utils.render.DisplayUtils;
import im.expensive.utils.render.font.Fonts;
import im.expensive.utils.text.GradientUtil;
import lombok.AccessLevel;
import lombok.RequiredArgsConstructor;
import lombok.experimental.FieldDefaults;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import static im.expensive.utils.render.ColorUtils.rgba;
@FieldDefaults(level = AccessLevel.PRIVATE)
@RequiredArgsConstructor
public class WatermarkRenderer implements ElementRenderer {
final ResourceLocation logowatermark = new ResourceLocation("expensive/images/hud/deathwave.png");;
float iconwidth = 53;
float iconheight = 38;
@Override
public void render(EventDisplay eventDisplay) {
MatrixStack ms = eventDisplay.getMatrixStack();
float posX = 4;
float posY = 4;
Style style = Expensive.getInstance().getStyleManager().getCurrentStyle();
//ебашим тут 1 бакроунд
float widthback1 = 152;
float heightback1 = 24;
//ебашим шадоу, чтёби красиво били)
DisplayUtils.drawShadow(posX + 5, posY + 5, widthback1, heightback1, 3, rgba(21,21,21,255));
//сам бакграунд
DisplayUtils.drawRoundedRect(posX + 5, posY + 5, widthback1, heightback1, 0.5F, rgba(21, 21, 21, 255));
//ебашим хуету с лого
float widthback2 = 32;
float heightback2 = 32;
DisplayUtils.drawRoundedRect(posX + 4, posY + 1, widthback2, heightback2,3, style.getFirstColor().getRGB());
DisplayUtils.drawShadow(posX + 2.2F, posY - 0.6F, widthback2 + 2, heightback2 + 2, 7, style.getFirstColor().getRGB(), style.getSecondColor().getRGB());
DisplayUtils.drawImage(logowatermark, posX - 7, posY - 2, iconwidth, iconheight, -1);
//ебашим текст в 1background
String name = "NEDO SKID";
float fontSize = 14.5f;
Fonts.sfbold.drawText(ms, name, posX + 36, posY + 8.5F, -1, fontSize);
}
}