clickgui numbersetting fix & html fix

This commit is contained in:
ThisIsALegitUsername 2023-04-01 20:45:59 +00:00
parent 7a0af698a3
commit 06951bc2b8
7 changed files with 61718 additions and 61696 deletions

View File

@ -263,7 +263,6 @@ window.addEventListener("load", () => {
<h2 id="clientversion">3.6</h2> <h2 id="clientversion">3.6</h2>
<p id="progresstext">0%</p> <p id="progresstext">0%</p>
<p class="ratio" >use <a href="./badwifi/index.html">this link</a> if your internet is bad</p>
<div id="meter"> <div id="meter">
<span style="width: 0%" id="progress"></span> <span style="width: 0%" id="progress"></span>
</div> </div>

File diff suppressed because it is too large Load Diff

View File

@ -257,7 +257,6 @@
<h2 id="clientversion">3.6</h2> <h2 id="clientversion">3.6</h2>
<p id="progresstext">0%</p> <p id="progresstext">0%</p>
<p class="ratio" >use <a href="./badwifi/index.html">this link</a> if your internet is bad</p>
<div id="meter"> <div id="meter">
<span style="width: 0%" id="progress"></span> <span style="width: 0%" id="progress"></span>
</div> </div>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ import dev.resent.module.base.Mod.Category;
import dev.resent.module.base.setting.BooleanSetting; import dev.resent.module.base.setting.BooleanSetting;
import dev.resent.module.base.setting.NumberSetting; import dev.resent.module.base.setting.NumberSetting;
@Module(name = "Particle multipler", category = Category.MISC) @Module(name = "Particle multipler", category = Category.MISC, hasSetting = true)
public class ParticleMultiplier extends Mod{ public class ParticleMultiplier extends Mod{
public static BooleanSetting alwaysCrit = new BooleanSetting("Always critical", "", false); public static BooleanSetting alwaysCrit = new BooleanSetting("Always critical", "", false);
public static BooleanSetting alwaysSharp = new BooleanSetting("Always sharpness", "", false); public static BooleanSetting alwaysSharp = new BooleanSetting("Always sharpness", "", false);

View File

@ -6,8 +6,8 @@ import java.util.Comparator;
import dev.resent.client.ClientInfo; import dev.resent.client.ClientInfo;
import dev.resent.client.Resent; import dev.resent.client.Resent;
import dev.resent.module.base.Mod; import dev.resent.module.base.Mod;
import dev.resent.module.base.ModManager;
import dev.resent.module.base.Mod.Category; import dev.resent.module.base.Mod.Category;
import dev.resent.module.base.ModManager;
import dev.resent.module.base.setting.BooleanSetting; import dev.resent.module.base.setting.BooleanSetting;
import dev.resent.module.base.setting.CustomRectSettingDraw; import dev.resent.module.base.setting.CustomRectSettingDraw;
import dev.resent.module.base.setting.ModeSetting; import dev.resent.module.base.setting.ModeSetting;
@ -22,7 +22,6 @@ import dev.resent.visual.ui.animation.Direction;
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;
import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
@ -45,7 +44,8 @@ public class ClickGUI extends GuiScreen {
public boolean close = false; public boolean close = false;
public Category selectedCategory = null; public Category selectedCategory = null;
public int sliderOffset; public int sliderOffset;
public boolean dragging; public boolean draggingNumber;
public boolean settingDrag = true;
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F)); Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
@ -105,7 +105,7 @@ public class ClickGUI extends GuiScreen {
if(s instanceof NumberSetting) { if(s instanceof NumberSetting) {
if(isMouseInside(mouseX, mouseY, width-150+sliderOffset, height+41+var, width-141+sliderOffset, height+50+var)) { if(isMouseInside(mouseX, mouseY, width-150+sliderOffset, height+41+var, width-141+sliderOffset, height+50+var)) {
dragging = true; draggingNumber = true;
} }
} }
@ -245,7 +245,7 @@ public class ClickGUI extends GuiScreen {
drawRect(width-150, height+43+var, width-45, height+47+var, -1); drawRect(width-150, height+43+var, width-45, height+47+var, -1);
RenderUtils.drawRoundedRect(width-150+sliderOffset, height+40+var, width-140+sliderOffset, height+50+var, 4, Color.RED.getRGB()); RenderUtils.drawRoundedRect(width-150+sliderOffset, height+40+var, width-140+sliderOffset, height+50+var, 4, Color.RED.getRGB());
if(dragging) { if(settingDrag) {
sliderOffset = mouseX-(width-150); sliderOffset = mouseX-(width-150);
ss.setValue(sliderOffset*(ss.max/100)); ss.setValue(sliderOffset*(ss.max/100));
}else { }else {
@ -253,9 +253,19 @@ public class ClickGUI extends GuiScreen {
} }
if(sliderOffset < 0) { if(sliderOffset < 0) {
dragging = false; settingDrag = false;
sliderOffset = 0; sliderOffset = 0;
}else if(draggingNumber){
settingDrag = true;
} }
if(sliderOffset > 100){
settingDrag = false;
sliderOffset = 100;
}else if(draggingNumber){
settingDrag = true;
}
} }
if (s instanceof BooleanSetting) { if (s instanceof BooleanSetting) {
@ -312,7 +322,7 @@ public class ClickGUI extends GuiScreen {
@Override @Override
public void mouseReleased(int mouseX, int mouseY, int mouseButton){ public void mouseReleased(int mouseX, int mouseY, int mouseButton){
dragging = false; draggingNumber = false;
} }
protected void keyTyped(char par1, int par2) { protected void keyTyped(char par1, int par2) {
@ -361,6 +371,6 @@ public class ClickGUI extends GuiScreen {
} }
private int getListMaxScroll() { private int getListMaxScroll() {
return 130 - this.height; return this.height;
} }
} }