Main menu

This commit is contained in:
UnknownUser1789 2023-01-14 20:58:56 +00:00
parent b3dc058416
commit 030e4594d9
5 changed files with 13691 additions and 13682 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,6 @@
package dev.resent.ui.mods; package dev.resent.ui.mods;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_DST_COLOR; import java.io.IOException;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_COLOR;
import dev.resent.Resent; import dev.resent.Resent;
import dev.resent.module.base.Mod; import dev.resent.module.base.Mod;
@ -10,7 +9,6 @@ import dev.resent.setting.ModeSetting;
import dev.resent.setting.Setting; import dev.resent.setting.Setting;
import dev.resent.util.render.Color; import dev.resent.util.render.Color;
import dev.resent.util.render.RenderUtils; import dev.resent.util.render.RenderUtils;
import java.io.IOException;
import net.lax1dude.eaglercraft.v1_8.Keyboard; import net.lax1dude.eaglercraft.v1_8.Keyboard;
import net.lax1dude.eaglercraft.v1_8.Mouse; import net.lax1dude.eaglercraft.v1_8.Mouse;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
@ -147,12 +145,14 @@ public class ClickGUI extends GuiScreen {
); );
if (m.hasSetting) { if (m.hasSetting) {
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
//fr.drawString("o", this.x+99+xo, height - 2 - fh * -(off) + 51 + 1 - offset, isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, this.x + 90 + xo - 1 + 10 + fr.getStringWidth("o"), height - 2 - fh * -(off) + 51 + 1 - offset + fr.FONT_HEIGHT) ? new Color(105, 105, 105, 65).getRGB() : -1); //fr.drawString("o", this.x+99+xo, height - 2 - fh * -(off) + 51 + 1 - offset, isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, this.x + 90 + xo - 1 + 10 + fr.getStringWidth("o"), height - 2 - fh * -(off) + 51 + 1 - offset + fr.FONT_HEIGHT) ? new Color(105, 105, 105, 65).getRGB() : -1);
GlStateManager.color(255, 0, 0);
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.disableAlpha(); GlStateManager.disableAlpha();
//GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0); //GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0);
if(isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, this.x + 90 + xo - 1 + 10 + fr.getStringWidth("o"), height - 2 - fh * -(off) + 51 + 1 - offset + fr.FONT_HEIGHT))
this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/gear.png")); this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/gear.png"));
GlStateManager.color(Color.RED.getRed(), Color.RED.getGreen(), Color.RED.getBlue());
Gui.drawModalRectWithCustomSizedTexture(this.x+99+xo, height - 2 - fh * -(off) + 51 + 1 - offset, 0, 0, 8, 8, 8, 8); Gui.drawModalRectWithCustomSizedTexture(this.x+99+xo, height - 2 - fh * -(off) + 51 + 1 - offset, 0, 0, 8, 8, 8, 8);
GlStateManager.disableBlend(); GlStateManager.disableBlend();
GlStateManager.enableAlpha(); GlStateManager.enableAlpha();

View File

@ -2,6 +2,7 @@ package net.minecraft.client.gui;
import dev.resent.ui.mods.ClientButton; import dev.resent.ui.mods.ClientButton;
import dev.resent.util.render.RenderUtils; import dev.resent.util.render.RenderUtils;
import net.lax1dude.eaglercraft.v1_8.profile.GuiScreenEditProfile;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -13,16 +14,17 @@ public class GuiMainMenu extends GuiScreen {
public void initGui() { public void initGui() {
this.buttonList.add(new ClientButton(2, this.width / 2 - 50, this.height / 2, 98, 16, "Multiplayer")); this.buttonList.add(new ClientButton(2, this.width / 2 - 50, this.height / 2, 98, 16, "Multiplayer"));
this.buttonList.add(new ClientButton(3, this.width / 2 - 50, this.height / 2 + 17, 98, 16, "Options")); this.buttonList.add(new ClientButton(3, this.width / 2 - 50, this.height / 2 + 17, 98, 16, "Options"));
this.buttonList.add(new ClientButton(4, this.width/2-50, this.height/2+17*2, 98, 16, "Edit profile"));
} }
@Override @Override
public void drawScreen(final int mouseX, final int mouseY, final float partialTicks) { public void drawScreen(final int mouseX, final int mouseY, final float partialTicks) {
this.drawDefaultBackground(); this.drawDefaultBackground();
this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/background.webp")); this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/background.webp"));
Gui.drawModalRectWithCustomSizedTexture(-21, -1 / 90, 0.0f, 0.0f, this.width + 20, this.height + 20, (float)(this.width + 21), (float)(this.height + 20)); Gui.drawModalRectWithCustomSizedTexture(0, 0, 0.0f, 0.0f, this.width, this.height, this.width + 21, this.height + 50);
final String s1 = "Copyright " + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "M" + EnumChatFormatting.RESET + "ojang AB"; final String s1 = "Copyright " + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "M" + EnumChatFormatting.RESET + "ojang AB";
this.drawString(this.fontRendererObj, s1, this.width - this.fontRendererObj.getStringWidth(s1) - 2, this.height - 10, -1); this.drawString(this.fontRendererObj, s1, this.width - this.fontRendererObj.getStringWidth(s1) - 2, this.height - 10, -1);
RenderUtils.drawCenteredScaledString("" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "Resent", this.width / 2 - 2, this.height / 2 - 50, -1, 1.5f); RenderUtils.drawCenteredScaledString("" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "Resent", this.width / 2, this.height / 2 - 50, -1, 3f);
super.drawScreen(mouseX, mouseY, partialTicks); super.drawScreen(mouseX, mouseY, partialTicks);
} }
@ -37,6 +39,10 @@ public class GuiMainMenu extends GuiScreen {
this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings)); this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
break; break;
} }
case 4: {
this.mc.displayGuiScreen(new GuiScreenEditProfile(this));
break;
}
} }
super.actionPerformed(button); super.actionPerformed(button);
} }