Clickgui always toggled
This commit is contained in:
parent
34cdc9e799
commit
4a9f859f4a
19418
javascript/classes.js
19418
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -76,9 +76,11 @@ public class ClickGUI extends GuiScreen {
|
||||||
this.openedMod = null;
|
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){
|
}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
|
//toggle new
|
||||||
|
if(m.getName() != "ClickGUI")
|
||||||
m.toggle();
|
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") {
|
} 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
|
//toggle classic
|
||||||
|
if(m.getName() != "ClickGUI")
|
||||||
m.toggle();
|
m.toggle();
|
||||||
}
|
}
|
||||||
if (xo > width / 2) {
|
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)) {
|
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
|
// Enabled outline
|
||||||
|
|
||||||
m.toggleAnimation.setAnimation(m.isEnabled() ? 20 : 0, 5);
|
m.toggleAnimation.setAnimation(m.isEnabled() ? 20 : 0, 7);
|
||||||
if(ModManager.clickGui.guiTheme.getValue() == "New"){
|
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+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);
|
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() {
|
public void onGuiClosed() {
|
||||||
Keyboard.enableRepeatEvents(true);
|
Keyboard.enableRepeatEvents(true);
|
||||||
|
ModManager.clickGui.setEnabled(false);
|
||||||
mc.gameSettings.saveOptions();
|
mc.gameSettings.saveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||||
public class HUDConfigScreen extends GuiScreen {
|
public class HUDConfigScreen extends GuiScreen {
|
||||||
|
|
||||||
public void initGui() {
|
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() {
|
public void onGuiClosed() {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package dev.resent.visual.ui;
|
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.util.render.Color;
|
||||||
import dev.resent.visual.ui.animation.SimpleAnimation;
|
import dev.resent.visual.ui.animation.SimpleAnimation;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -33,6 +33,8 @@ public class PreGUI extends GuiScreen {
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
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) {
|
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());
|
mc.displayGuiScreen(new ClickGUI());
|
||||||
}
|
}
|
||||||
super.mouseClicked(parInt1, parInt2, parInt3);
|
super.mouseClicked(parInt1, parInt2, parInt3);
|
||||||
|
|
|
@ -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.ListenableFuture;
|
||||||
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFutureTask;
|
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFutureTask;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
|
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.PlatformInput;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
|
import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user