diff --git a/src/main/java/shit/zen/hud/HudElement.java b/src/main/java/shit/zen/hud/HudElement.java index 7567c58..88427f6 100644 --- a/src/main/java/shit/zen/hud/HudElement.java +++ b/src/main/java/shit/zen/hud/HudElement.java @@ -2,7 +2,6 @@ package shit.zen.hud; import lombok.Getter; import lombok.Setter; -import lombok.Generated; import shit.zen.event.impl.GlRenderEvent; import shit.zen.event.impl.Render2DEvent; import shit.zen.modules.Category; @@ -15,15 +14,16 @@ extends Module { protected float x; @Getter @Setter protected float y; - protected float hudWidth; - protected float hudHeight; - @Getter + @Getter @Setter + protected float width; + @Getter @Setter + protected float height; + @Getter @Setter private boolean dragging = false; @Getter @Setter private float dragOffsetX; @Getter @Setter private float dragOffsetY; - protected boolean visible; public HudElement(String string) { super(string, Category.RENDER); @@ -51,47 +51,10 @@ extends Module { } public boolean isHovered(int mouseX, int mouseY) { - return RenderUtil.isHovered(this.x, this.y, this.hudWidth, this.hudHeight, mouseX, mouseY); + return RenderUtil.isHovered(this.x, this.y, this.width, this.height, mouseX, mouseY); } public void stopDragging() { this.dragging = false; } - - @Generated - public float getWidth() { - return this.hudWidth; - } - - @Generated - public float getHeight() { - return this.hudHeight; - } - - @Override - @Generated - public boolean isEnabled() { - return this.visible; - } - - @Generated - public void setWidth(float width) { - this.hudWidth = width; - } - - @Generated - public void setHeight(float height) { - this.hudHeight = height; - } - - @Generated - protected void setDragging(boolean dragging) { - this.dragging = dragging; - } - - @Override - @Generated - public void setEnabled(boolean enabled) { - this.visible = enabled; - } } \ No newline at end of file diff --git a/src/main/java/shit/zen/modules/Module.java b/src/main/java/shit/zen/modules/Module.java index f946441..2e133b9 100644 --- a/src/main/java/shit/zen/modules/Module.java +++ b/src/main/java/shit/zen/modules/Module.java @@ -69,6 +69,7 @@ extends ClientBase { public void setEnabled(boolean enabled) { this.enabled = enabled; + if (enabled) { ZenClient.getInstance().getEventBus().register(this); this.onEnable(); @@ -93,4 +94,4 @@ extends ClientBase { return this.keyCode; } - } \ No newline at end of file +} \ No newline at end of file diff --git a/src/main/java/shit/zen/patch/ChatScreenPatch.java b/src/main/java/shit/zen/patch/ChatScreenPatch.java index b4f76aa..89fa9d5 100644 --- a/src/main/java/shit/zen/patch/ChatScreenPatch.java +++ b/src/main/java/shit/zen/patch/ChatScreenPatch.java @@ -16,11 +16,11 @@ public class ChatScreenPatch { public static void onRender(ChatScreen screen, GuiGraphics graphics, int mouseX, int mouseY, float partialTick, CallbackInfo callbackInfo) { try { for (HudElement element : ZenClient.getInstance().getHudManager().getHudElements().stream().filter(Module::isEnabled).toList()) { - if (!element.isEnabled()) continue; + if (!element.isDragging()) continue; element.mouseDragged(mouseX, mouseY); boolean leftDown = GLFW.glfwGetMouseButton(ClientBase.mc.getWindow().getWindow(), 0) == 1; if (!leftDown) { - element.setEnabled(false); + element.setDragging(false); } } } catch (Exception exception) { diff --git a/src/main/resources/assets/zen/cloud_assets/lie.wav b/src/main/resources/assets/zen/cloud_assets/lie.wav new file mode 100644 index 0000000..39dedcf Binary files /dev/null and b/src/main/resources/assets/zen/cloud_assets/lie.wav differ diff --git a/src/main/resources/assets/zen/cloud_assets/panel.png b/src/main/resources/assets/zen/cloud_assets/panel.png new file mode 100644 index 0000000..2fb242e Binary files /dev/null and b/src/main/resources/assets/zen/cloud_assets/panel.png differ diff --git a/src/main/resources/assets/zen/cloud_assets/ptr.png b/src/main/resources/assets/zen/cloud_assets/ptr.png new file mode 100644 index 0000000..e12fe16 Binary files /dev/null and b/src/main/resources/assets/zen/cloud_assets/ptr.png differ diff --git a/src/main/resources/assets/zen/cloud_assets/truth.wav b/src/main/resources/assets/zen/cloud_assets/truth.wav new file mode 100644 index 0000000..d7b24d1 Binary files /dev/null and b/src/main/resources/assets/zen/cloud_assets/truth.wav differ