package UwU_.frizemare.client.ui.mainmenu;
import UwU_.frizemare.client.FrizeMare;
import UwU_.frizemare.client.ui.altmanager.GuiAlt;
import UwU_.frizemare.client.ui.button.GuiMainMenuButton;
import UwU_.frizemare.client.ui.particle.ParticleUtils;
import UwU_.frizemare.client.utils.math.animations.Animation;
import UwU_.frizemare.client.utils.math.animations.impl.DecelerateAnimation;
import UwU_.frizemare.client.utils.render.ClientHelper;
import UwU_.frizemare.client.utils.render.RenderUtils;
import UwU_.frizemare.client.utils.render.RoundedUtil;
import net.minecraft.client.gui.*;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Mouse;
import java.awt.*;
import java.io.IOException;
public class FrizeMareMainMenu extends GuiScreen {
private int width;
public float scale = 2;
private int height;
private final long initTime = System.currentTimeMillis();
private Animation initAnimation;
public FrizeMareMainMenu() {
}
@Override
public void initGui() {
ScaledResolution sr = new ScaledResolution(this.mc);
this.width = sr.getScaledWidth();
this.height = sr.getScaledHeight();
//initAnimation = new DecelerateAnimation(300, 1);
this.buttonList.add(new GuiMainMenuButton(0, (this.width / 2) - 90, this.height / 2 + 4, 180, 10, "Одиночный"));
this.buttonList.add(new GuiMainMenuButton(1, this.width / 2 - 90, this.height / 2 + 32, 180, 10, "Мультилеер"));
this.buttonList.add(new GuiMainMenuButton(2, this.width / 2 - 90, this.height / 2 + 62, 180, 10, "Альт Аккаунт"));
// this.buttonList.add(new GuiMainMenuButton(3, this.width / 2 - 1, this.height / 2 + 88, 83, 5, "Настройки"));
// this.img.add(new GuiMainMenuButton(new ResourceLocation("rich/vk.png"), 5, width / 2 - -22, height / 2 + 72, 20, 10, ""));
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
ScaledResolution res = new ScaledResolution(mc);
//
//RoundedUtil.drawImage(new ResourceLocation("rich/celka.png"), - 0.1f, - 0.1f, 1000, 650, Color.white);
// Gui.drawRect(0, 0, 1500, 1500, new Color(17, 17, 17).getRGB());
ParticleUtils.drawParticles(Mouse.getX() * this.width / this.mc.displayWidth, this.height - Mouse.getY() * this.height / this.mc.displayHeight - 1);
RenderUtils.drawImage(new ResourceLocation("rich/free.png"), -0.1f, -0.1f, 800.0f, 650, new Color(255, 255, 255, 255));
// RenderUtils.drawImage(new ResourceLocation("rich/vk.png"), 255.1f, 315.1f, 15.0f, 15, new Color(255, 255, 255, 255));
// RenderUtils.drawImage(new ResourceLocation("rich/vk.png"), 295.1f, 315.1f, 30.0f, 30, new Color(255, 255, 255, 255));
// RenderUtils.drawImage(new ResourceLocation("rich/celka2.png"), 255.1f, 230.1f, 10.0f, 10, new Color(255, 255, 255, 255));
// RenderUtils.drawImage(new ResourceLocation("rich/img2.png"), 15, 5, 40, 40, Color.WHITE);
// RenderUtils.drawBlurredShadow(230,130,225,190, 0,new Color(0,0,0, 170));
// RenderUtils.drawOutlineRect( 100,100 ,100,100, new Color(26,26,26, 0), new Color(255, 255, 255,255));
//RenderUtils.drawBlurredShadow(390,230,180,190, 4,new Color(0,0,0, 170));
//RenderUtils.drawOutlineRect;Outline( 390,230 ,180,190, 2, 0.5f, new Color(26,26,26, 0), new Color(255, 255, 255,255));
//mc.mntsb_30.drawCenteredStringWithShadow(Exclusive.instance.name, (float) (sr.getScaledWidth() / 2), (float) (sr.getScaledHeight() / 2.3), -1);
//super.drawScreen(mouseX, mouseY, partialTicks);
ScaledResolution sr = new ScaledResolution(mc);
//RenderUtils.drawImage(new ResourceLocation("rich/logo.png"), 322.1f, 130.1f, 40.0f, 40, new Color(255, 255, 255, 255));
RoundedUtil.drawRound(225.1f, 130.1f, 230.3f, 150.3f, 5.1f, new Color(17, 16, 16, 98));
// RoundedUtil.drawOutline( 2, 0.5f, new Color(26,26,26, 0), new Color(255, 255, 255,255));/mc.mntsb_18.drawStringWithShadow("ChangeLog:", 12.1f, 12.1f, new Color(255, 255, 255).getRGB());
// RoundedUtil.dra(new ResourceLocation("rich/logo.png"), 322.1f, 130.1f, 40, 40, Color.white);
mc.rubik_30.drawCenteredStringWithShadow("Dremity Beta", (float) (sr.getScaledWidth() / 2), (float) (sr.getScaledHeight() / 2.5), -1);
mc.rubik_18.drawCenteredStringWithShadow("Build: 90193", (float) (sr.getScaledWidth() / 2), (float) (sr.getScaledHeight() / 2.2), -1);
// mc.mntsb_18.drawCenteredStringWithShadow("Hui by zxcnikas?#4310", (float) (sr.getScaledWidth() / 2), (float) (sr.getScaledHeight() / 2.2), -1);
// mc.mntsb_18.drawCenteredStringWithShadow("CLIENT", (float) (sr.getScaledWidth() / 1), (float) (sr.getScaledHeight() / 2.2), -1);
// mc.rubik_18.drawStringWithOutline("Версия клиента - " + Rich.instance.version, 2.0F, (float) (sr.getScaledHeight() - mc.neverlose900_16.getFontHeight() - 2), -1);
//mc.rubik_18.drawStringWithShadow("UID " + "Willy", sr.getScaledWidth() - mc.rubik_18.getStringWidth("UID " + "Willy") - 4, sr.getScaledHeight() - 9, new Color(255, 255, 255).getRGB());
super.drawScreen(mouseX, mouseY, partialTicks);
}
public void actionPerformed(GuiButton button) throws IOException {
switch (button.id) {
case 0:
this.mc.displayGuiScreen(new GuiWorldSelection(this));
break;
case 1:
this.mc.displayGuiScreen(new GuiMultiplayer(this));
break;
case 2:
this.mc.displayGuiScreen(new GuiAlt());
break;
case 3:
this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
break;
case 4:
System.exit(0);
FrizeMare.instance.configManager.saveConfig("default");
FrizeMare.instance.fileManager.saveFiles();
break;
}
super.actionPerformed(button);
}
}