smh
This commit is contained in:
parent
98e3e793b5
commit
b3dc058416
BIN
desktopRuntime/resources/assets/eagler/gui/background.webp
Normal file
BIN
desktopRuntime/resources/assets/eagler/gui/background.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 85 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 22 KiB |
Binary file not shown.
13863
javascript/classes.js
13863
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -148,12 +148,14 @@ public class ClickGUI extends GuiScreen {
|
||||||
|
|
||||||
if (m.hasSetting) {
|
if (m.hasSetting) {
|
||||||
//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(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.color(255, 0, 0);
|
||||||
GlStateManager.enableBlend();
|
GlStateManager.enableBlend();
|
||||||
GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
GlStateManager.disableAlpha();
|
||||||
|
//GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||||
this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/gear.png"));
|
this.mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/gear.png"));
|
||||||
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();
|
||||||
//RenderUtils.drawRectOutline(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, -1);
|
//RenderUtils.drawRectOutline(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, -1);
|
||||||
//fr.drawString("+", this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, -1);
|
//fr.drawString("+", this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, -1);
|
||||||
//fr.drawString(" x", this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, -1);
|
//fr.drawString(" x", this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 + 1 - offset, -1);
|
||||||
|
|
|
@ -13,15 +13,10 @@ public class ClientButton extends GuiButton
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawButton(final Minecraft mc, final int mouseX, final int mouseY) {
|
public void drawButton(final Minecraft mc, final int mouseX, final int mouseY) {
|
||||||
if (this.visible) {
|
FontRenderer fr = mc.fontRendererObj;
|
||||||
final FontRenderer fr = mc.fontRendererObj;
|
this.hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);
|
||||||
this.hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);
|
Gui.drawRect(this.xPosition, this.yPosition, this.xPosition + this.width, this.yPosition + this.height, hovered ? 0x30ffffff :0x20ffffff);
|
||||||
Gui.drawRect(this.xPosition + this.width, this.yPosition + this.height, this.xPosition, this.yPosition, -1358954496);
|
|
||||||
int j = -1;
|
this.drawCenteredString(fr, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, -1);
|
||||||
if (this.hovered) {
|
|
||||||
j = -11184641;
|
|
||||||
}
|
|
||||||
this.drawCenteredString(fr, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, j);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
package dev.resent.util.render;
|
package dev.resent.util.render;
|
||||||
|
|
||||||
import dev.resent.setting.ModeSetting;
|
import dev.resent.setting.ModeSetting;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
|
|
||||||
public class RenderUtils {
|
public class RenderUtils {
|
||||||
|
@ -55,4 +57,12 @@ public class RenderUtils {
|
||||||
Gui.drawRect(width - 1, y, width, height, color);
|
Gui.drawRect(width - 1, y, width, height, color);
|
||||||
Gui.drawRect(x, height - 1, width, height, color);
|
Gui.drawRect(x, height - 1, width, height, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void drawCenteredScaledString(String text, int x,int y, int color, float scale){
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.scale(scale,scale,scale);
|
||||||
|
Gui.drawCenteredString(Minecraft.getMinecraft().fontRendererObj, text, (int) (x / scale), (int) (y / scale), color);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class Gui {
|
||||||
* Renders the specified text to the screen, center-aligned.
|
* Renders the specified text to the screen, center-aligned.
|
||||||
* Args : renderer, string, x, y, color
|
* Args : renderer, string, x, y, color
|
||||||
*/
|
*/
|
||||||
public void drawCenteredString(FontRenderer fontRendererIn, String text, int x, int y, int color) {
|
public static void drawCenteredString(FontRenderer fontRendererIn, String text, int x, int y, int color) {
|
||||||
fontRendererIn.drawStringWithShadow(text, (float) (x - fontRendererIn.getStringWidth(text) / 2), (float) y, color);
|
fontRendererIn.drawStringWithShadow(text, (float) (x - fontRendererIn.getStringWidth(text) / 2), (float) y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,29 @@
|
||||||
package net.minecraft.client.gui;
|
package net.minecraft.client.gui;
|
||||||
|
|
||||||
import dev.resent.ui.mods.ClientButton;
|
import dev.resent.ui.mods.ClientButton;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
import dev.resent.util.render.RenderUtils;
|
||||||
|
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;
|
||||||
|
|
||||||
public class GuiMainMenu extends GuiScreen
|
@SuppressWarnings("all")
|
||||||
{
|
public class GuiMainMenu extends GuiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
this.buttonList.add(new ClientButton(2, this.width / 2 - 50, this.height / 2, 98, 16, "Multiplayer")); //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")); //Settings
|
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 - 23, 6, 17, 17, EnumChatFormatting.BOLD + ""));
|
|
||||||
|
|
||||||
super.initGui();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@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.jpg"));
|
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(-21, -1 / 90, 0.0f, 0.0f, this.width + 20, this.height + 20, (float)(this.width + 21), (float)(this.height + 20));
|
||||||
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);
|
||||||
this.drawCenteredString(this.mc.fontRendererObj, EnumChatFormatting.AQUA + "Resent " + EnumChatFormatting.RESET + "Client", this.width / 2 - 2, this.height / 2 - 30, -1);
|
RenderUtils.drawCenteredScaledString("" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + "Resent", this.width / 2 - 2, this.height / 2 - 50, -1, 1.5f);
|
||||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
//mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/exit.png"));
|
|
||||||
//Gui.drawModalRectWithCustomSizedTexture(width - 21, 6, 0, 0, 16, 17, 16, 17);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user