Clickgui always toggled

This commit is contained in:
ThisIsALegitUsername 2023-03-01 03:17:34 +00:00
parent 34cdc9e799
commit 4a9f859f4a
6 changed files with 9719 additions and 9713 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -76,9 +76,11 @@ public class ClickGUI extends GuiScreen {
this.openedMod = null;
}else if(isMouseInside(mouseX, mouseY, this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+80+xo, height+30-fh*-off+30+2-offset+17) && ModManager.clickGui.guiTheme.getValue() == "New" && openedMod == null){
//toggle new
if(m.getName() != "ClickGUI")
m.toggle();
} else if (isMouseInside(mouseX, mouseY, this.x + 10 + xo - 2 + 10, height - 2 - fh * -(off) + 50 - 2 - offset, this.x + 90 + xo + 22, height + 30 - fh * (-off) + 30 + 2 - offset) && mouseButton == 0 && openedMod == null && ModManager.clickGui.guiTheme.getValue() == "Classic revised") {
//toggle classic
if(m.getName() != "ClickGUI")
m.toggle();
}
if (xo > width / 2) {
@ -182,7 +184,7 @@ public class ClickGUI extends GuiScreen {
if (height - 2 - fh * -(off) + 50 - 2 - offset > height + 29 && height + 40 - fh * (-off) + 30 +15 - offset < y + 20 && (introAnimation != null ? introAnimation.isDone() : true)) {
// Enabled outline
m.toggleAnimation.setAnimation(m.isEnabled() ? 20 : 0, 5);
m.toggleAnimation.setAnimation(m.isEnabled() ? 20 : 0, 7);
if(ModManager.clickGui.guiTheme.getValue() == "New"){
RenderUtils.drawRoundedRect(this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+80+xo, height+30-fh*-off+30+2-offset+17, 6, new Color(97, 97, 97).getRGB(), true);
RenderUtils.drawRoundedRect(this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+60+xo+m.toggleAnimation.getValue(), height+30-fh*-off+30+2-offset+17, 6, Color.green.getRGB(), true);
@ -263,6 +265,7 @@ public class ClickGUI extends GuiScreen {
public void onGuiClosed() {
Keyboard.enableRepeatEvents(true);
ModManager.clickGui.setEnabled(false);
mc.gameSettings.saveOptions();
}

View File

@ -8,7 +8,7 @@ import net.minecraft.client.gui.GuiScreen;
public class HUDConfigScreen extends GuiScreen {
public void initGui() {
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 148, "Back"));
this.buttonList.add(new GuiButton(200, width / 2 - 100, height / 6 + 148, "Back"));
}
public void onGuiClosed() {

View File

@ -1,6 +1,6 @@
package dev.resent.visual.ui;
import dev.resent.util.misc.GlUtils;
import dev.resent.module.base.ModManager;
import dev.resent.util.render.Color;
import dev.resent.visual.ui.animation.SimpleAnimation;
import net.minecraft.client.Minecraft;
@ -33,6 +33,8 @@ public class PreGUI extends GuiScreen {
@Override
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
if (isMouseInside(parInt1, parInt2, GuiScreen.width / 2 - 30, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 50, GuiScreen.height / 2 + 50) && parInt3 == 0) {
ModManager.clickGui.setEnabled(true);
mc.gameSettings.saveOptions();
mc.displayGuiScreen(new ClickGUI());
}
super.mouseClicked(parInt1, parInt2, parInt3);

View File

@ -38,7 +38,6 @@ import net.lax1dude.eaglercraft.v1_8.futures.FutureTask;
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFuture;
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFutureTask;
import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput;
import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;