cps should be a bit better and made mod name render on top of mod in the edit layout menu
This commit is contained in:
parent
7d900a1de8
commit
f5795e9f09
Binary file not shown.
File diff suppressed because it is too large
Load Diff
57895
javascript/classes.js
57895
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,7 @@
|
|||
package dev.resent.module.base;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.util.render.Color;
|
||||
import dev.resent.util.render.RenderUtils;
|
||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
|
@ -52,7 +53,7 @@ public abstract class RenderMod extends Mod {
|
|||
|
||||
Gui.drawRect(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), hovered ? 0x50FFFFFF : 0x40FFFFFF);
|
||||
RenderUtils.drawRectOutline(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), -1);
|
||||
|
||||
mc.fontRendererObj.drawStringWithShadow(getName(), this.x, this.y - 10, new Color(255,255,255).getRGB());
|
||||
final boolean mouseOverX = (mouseX >= this.getX() && mouseX <= this.getX() + this.getWidth());
|
||||
final boolean mouseOverY = (mouseY >= this.getY() && mouseY <= this.getY() + this.getHeight());
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class CPS extends RenderMod {
|
|||
}
|
||||
|
||||
final long time = System.currentTimeMillis();
|
||||
FuncUtils.removeIf(clicks, aLong -> aLong + 1000 < time);
|
||||
FuncUtils.removeIf(clicks, aLong -> aLong + 6000 < time);
|
||||
|
||||
drawString("[CPS: " + clicks.size() + "]", this.x + 2, this.y + 2);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class ClickGUI extends GuiScreen {
|
|||
}
|
||||
|
||||
if (isMouseInside(mouseX, mouseY, sr.getScaledWidth() / 2 - fr.getStringWidth("Edit Layout") / 2 - 5, sr.getScaledHeight() - y - 9, sr.getScaledWidth() / 2 - fr.getStringWidth("Edit Layout") / 2 + 5 + fr.getStringWidth("Edit Layout"), sr.getScaledHeight() - y + 5) && mouseButton == 0) {
|
||||
mc.displayGuiScreen(new HUDConfigScreen());
|
||||
mc.displayGuiScreen(new HUDConfigScreen(this));
|
||||
this.openedMod = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,15 @@ import net.minecraft.client.gui.GuiScreen;
|
|||
|
||||
public class HUDConfigScreen extends GuiScreen {
|
||||
|
||||
private GuiScreen parentGuiScreen;
|
||||
|
||||
public HUDConfigScreen(GuiScreen parentScreen) {
|
||||
parentGuiScreen = parentScreen;
|
||||
}
|
||||
|
||||
|
||||
public void initGui() {
|
||||
this.buttonList.add(new GuiButton(200, width / 2 - 100, height / 6 + 148, "Back"));
|
||||
this.buttonList.add(new GuiButton(200, width / 2 - 100, height - 30, "Back"));
|
||||
}
|
||||
|
||||
public void onGuiClosed() {
|
||||
|
@ -23,7 +30,7 @@ public class HUDConfigScreen extends GuiScreen {
|
|||
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if (par1GuiButton.id == 200) {
|
||||
this.mc.displayGuiScreen(new ClickGUI());
|
||||
this.mc.displayGuiScreen(parentGuiScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import dev.resent.module.base.ModManager;
|
|||
import dev.resent.util.render.Color;
|
||||
import dev.resent.visual.ui.animation.SimpleAnimation;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -21,12 +22,15 @@ public class PreGUI extends GuiScreen {
|
|||
slideAnimation.setAnimation(200, 7);
|
||||
|
||||
boolean isInside = isMouseInside(i, j, GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50);
|
||||
boolean isInside2 = isMouseInside(i, j, GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 55, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 85);
|
||||
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/logo.png"));
|
||||
Gui.drawModalRectWithCustomSizedTexture(GuiScreen.width / 2 - 20, GuiScreen.height / 2 - 250 + (int)slideAnimation.getValue(), 0, 0, 60, 60, 60, 60);
|
||||
Gui.drawRect(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50, isInside ? 0x90FFFFFF : new Color(230, 230, 230, (int)opacityAnimation.getValue()).getRGB());
|
||||
Gui.drawRect(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 55, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 85, isInside2 ? 0x90FFFFFF : new Color(230, 230, 230, (int)opacityAnimation.getValue()).getRGB());
|
||||
//RenderUtils.drawRectOutline(GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 50, 0x080FFFFFF);
|
||||
if(opacityAnimation.isDone()) {
|
||||
mc.fontRendererObj.drawStringWithShadow("Mods", GuiScreen.width / 2 - 2, GuiScreen.height / 2 + 35 - 9 / 2, -1);
|
||||
mc.fontRendererObj.drawStringWithShadow("Edit Layout", GuiScreen.width / 2 - 17, GuiScreen.height / 2 + 70 - 9 / 2, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,6 +40,12 @@ public class PreGUI extends GuiScreen {
|
|||
ModManager.clickGui.setEnabled(true);
|
||||
mc.gameSettings.saveOptions();
|
||||
mc.displayGuiScreen(new ClickGUI());
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
if (isMouseInside(parInt1, parInt2, GuiScreen.width / 2 - 20, GuiScreen.height / 2 + 55, GuiScreen.width / 2 + 40, GuiScreen.height / 2 + 85)) {
|
||||
mc.gameSettings.saveOptions();
|
||||
mc.displayGuiScreen(new HUDConfigScreen(this));
|
||||
mc.getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
super.mouseClicked(parInt1, parInt2, parInt3);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user