From 2dc68d96e387bc488015f23b2313301bf32afee1 Mon Sep 17 00:00:00 2001 From: ThisIsALegitUsername <73719631+ThisIsALegitUsername@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:05:32 -0600 Subject: [PATCH] Added some descriptions & fixed open settings --- src/main/java/dev/resent/module/impl/hud/ArmorHud.java | 2 +- src/main/java/dev/resent/module/impl/hud/BPS.java | 4 ++-- src/main/java/dev/resent/module/impl/hud/CPS.java | 2 +- src/main/java/dev/resent/module/impl/hud/ClickGui.java | 2 +- .../java/dev/resent/module/impl/hud/ComboCounter.java | 2 +- .../visual/ui/clickgui/rewrite/ClickGuiRewrite.java | 10 +++++----- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/dev/resent/module/impl/hud/ArmorHud.java b/src/main/java/dev/resent/module/impl/hud/ArmorHud.java index cd6da84b..b67b6f79 100644 --- a/src/main/java/dev/resent/module/impl/hud/ArmorHud.java +++ b/src/main/java/dev/resent/module/impl/hud/ArmorHud.java @@ -9,7 +9,7 @@ import net.minecraft.client.gui.GuiIngame; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.item.ItemStack; -@RenderModule(name = "ArmorHud", category = Category.HUD, x = 20, y = 4, hasSetting = true, description = "ArmorHUD") +@RenderModule(name = "ArmorHud", category = Category.HUD, x = 20, y = 4, hasSetting = true, description = "See armor durability without opening your inventory") public class ArmorHud extends RenderMod { public ScaledResolution sr; diff --git a/src/main/java/dev/resent/module/impl/hud/BPS.java b/src/main/java/dev/resent/module/impl/hud/BPS.java index ad81f6b8..ce6cd75f 100644 --- a/src/main/java/dev/resent/module/impl/hud/BPS.java +++ b/src/main/java/dev/resent/module/impl/hud/BPS.java @@ -6,7 +6,7 @@ import dev.resent.annotation.RenderModule; import dev.resent.module.base.Mod.Category; import dev.resent.module.base.RenderMod; -@RenderModule(name = "BPS", category = Category.HUD, x = 4, y = 16) +@RenderModule(name = "BPS", category = Category.HUD, x = 4, y = 16, description = "See your current blocks per second") public class BPS extends RenderMod{ public int getWidth() { return mc.fontRendererObj.getStringWidth(getText()) + 4;} @@ -17,7 +17,7 @@ public class BPS extends RenderMod{ } public String getText(){ - return "BPS: " + new DecimalFormat("0.##").format(getBPS()); + return "[BPS: " + new DecimalFormat("0.##").format(getBPS() + "]"); } public void draw(){ diff --git a/src/main/java/dev/resent/module/impl/hud/CPS.java b/src/main/java/dev/resent/module/impl/hud/CPS.java index 34dc36e7..11122d90 100644 --- a/src/main/java/dev/resent/module/impl/hud/CPS.java +++ b/src/main/java/dev/resent/module/impl/hud/CPS.java @@ -9,7 +9,7 @@ import dev.resent.module.base.RenderMod; import dev.resent.util.misc.FuncUtils; import net.lax1dude.eaglercraft.v1_8.Mouse; -@RenderModule(name = "CPS", category = Category.HUD, x = 4, y = 26) +@RenderModule(name = "CPS", category = Category.HUD, x = 4, y = 26, description = "See your clicks per second") public class CPS extends RenderMod { private List clicks = new ArrayList<>(); diff --git a/src/main/java/dev/resent/module/impl/hud/ClickGui.java b/src/main/java/dev/resent/module/impl/hud/ClickGui.java index 5a3a73c8..ac977b31 100644 --- a/src/main/java/dev/resent/module/impl/hud/ClickGui.java +++ b/src/main/java/dev/resent/module/impl/hud/ClickGui.java @@ -7,7 +7,7 @@ import dev.resent.module.base.setting.BooleanSetting; import dev.resent.module.base.setting.ModeSetting; import dev.resent.module.base.setting.NumberSetting; -@Module(name = "ClickGUI", category = Category.HUD, hasSetting = true) +@Module(name = "ClickGUI", category = Category.HUD, hasSetting = true, description = "Customize Resent's UI") public class ClickGui extends Mod{ public BooleanSetting scroll = new BooleanSetting("Smooth scroll", "", false); diff --git a/src/main/java/dev/resent/module/impl/hud/ComboCounter.java b/src/main/java/dev/resent/module/impl/hud/ComboCounter.java index 36f39a18..f5f7ac87 100644 --- a/src/main/java/dev/resent/module/impl/hud/ComboCounter.java +++ b/src/main/java/dev/resent/module/impl/hud/ComboCounter.java @@ -7,7 +7,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.network.play.server.S19PacketEntityStatus; -@RenderModule(name = "ComboCounter", category = Category.HUD, x = 4, y = 14) +@RenderModule(name = "ComboCounter", category = Category.HUD, x = 4, y = 14, description = "Count how many hits in a row you've gotten") public class ComboCounter extends RenderMod { public static boolean attacked = false; diff --git a/src/main/java/dev/resent/visual/ui/clickgui/rewrite/ClickGuiRewrite.java b/src/main/java/dev/resent/visual/ui/clickgui/rewrite/ClickGuiRewrite.java index e9b89f2d..2b583a28 100644 --- a/src/main/java/dev/resent/visual/ui/clickgui/rewrite/ClickGuiRewrite.java +++ b/src/main/java/dev/resent/visual/ui/clickgui/rewrite/ClickGuiRewrite.java @@ -196,7 +196,7 @@ public class ClickGuiRewrite extends GuiScreen { if (!m.isAdmin() && m.getName().toLowerCase().startsWith(searchString.toLowerCase()) && selectedMod == null) { if (y + 115 + offset + scrollOffset > y + 95 && y + 185 + offset + scrollOffset < y + height && part == "Home") { - if (isMouseInside(mouseX, mouseY, x + width - 60, y + 140 + offset, x + width - 40, y + 160 + offset) && mouseButton == 0 && m.doesHaveSetting()) { + if (isMouseInside(mouseX, mouseY, x + width - 60, y + 140 + offset + scrollOffset, x + width - 40, y + 160 + offset + scrollOffset) && mouseButton == 0 && m.doesHaveSetting()) { selectedMod = m; int settingOffset = 0; @@ -210,10 +210,6 @@ public class ClickGuiRewrite extends GuiScreen { } if(isMouseInside(mouseX, mouseY, x + 80, y + 115 + offset + scrollOffset, x + width - 20, y + 185 + offset + scrollOffset)) { - if(mouseButton == 0) { - m.toggle(); - } - if(mouseButton == 1 && m.doesHaveSetting()) { selectedMod = m; @@ -227,6 +223,10 @@ public class ClickGuiRewrite extends GuiScreen { settingOffset += 25; } } + + if(mouseButton == 0 && selectedMod == null) { + m.toggle(); + } } }