From b33d3c3a7f8886bc1f1fff37439ea4ba8e0e37c5 Mon Sep 17 00:00:00 2001 From: ThisIsALegitUsername <73719631+ThisIsALegitUsername@users.noreply.github.com> Date: Fri, 24 Feb 2023 18:22:30 -0500 Subject: [PATCH] Center words & add outlines --- .../java/dev/resent/util/render/RenderUtils.java | 2 +- src/main/java/dev/resent/visual/ui/ClickGUI.java | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/dev/resent/util/render/RenderUtils.java b/src/main/java/dev/resent/util/render/RenderUtils.java index 5daa9a41..2189b8fd 100644 --- a/src/main/java/dev/resent/util/render/RenderUtils.java +++ b/src/main/java/dev/resent/util/render/RenderUtils.java @@ -166,7 +166,7 @@ public class RenderUtils { return Color.WHITE; } - public static void drawRectOutline(int param1, int param2, int width1, int height1, int color) { + public static void drawRectOutline(double param1, double param2, double width1, double height1, int color) { Gui.drawRect(param1, param2, width1, param2 + 1, color); Gui.drawRect(param1, param2, param1 + 1, height1, color); Gui.drawRect(width1 - 1, param2, width1, height1, color); diff --git a/src/main/java/dev/resent/visual/ui/ClickGUI.java b/src/main/java/dev/resent/visual/ui/ClickGUI.java index 57d972e5..46b2c856 100644 --- a/src/main/java/dev/resent/visual/ui/ClickGUI.java +++ b/src/main/java/dev/resent/visual/ui/ClickGUI.java @@ -149,12 +149,15 @@ public class ClickGUI extends GuiScreen { fr.drawString("X", width + 18, height - 2, -1); //categories - fr.drawStringWithShadow("All", x+5, height+16, -1); - fr.drawStringWithShadow("Hud", x+27f, height+16, -1); + RenderUtils.drawRectOutline(x+0.8d, height+14, x+20, height+25, -1); + RenderUtils.drawRectOutline(x+23d, height+14, x+47, height+25, -1); + RenderUtils.drawRectOutline(x+50, height+14, x+75, height+25, -1); + drawRect(x+0.8d, height+14, x+20, height+25, isMouseInside(mouseX, mouseY, x, height+14, x+20, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB()); + drawRect(x+23d, height+14, x+47, height+25, isMouseInside(mouseX, mouseY, x+24, height+14, x+46, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB()); + drawRect(x+50, height+14, x+75, height+25, isMouseInside(mouseX, mouseY, x+50, height+14, x+74, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB()); + fr.drawStringWithShadow("All", x+5f, height+16, -1); + fr.drawStringWithShadow("Hud", x+26.5f, height+16, -1); fr.drawStringWithShadow("Misc", x+53, height+16, -1); - drawRect(x, height+14, x+20, height+25, isMouseInside(mouseX, mouseY, x, height+14, x+20, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB()); - drawRect(x+24, height+14, x+46, height+25, isMouseInside(mouseX, mouseY, x+24, height+14, x+46, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB()); - drawRect(x+50, height+14, x+74, height+25, isMouseInside(mouseX, mouseY, x+50, height+14, x+74, height+25) ? new Color(150, 150, 150, 65).getRGB() : new Color(211, 211, 211, 65).getRGB()); //white line drawRect(x - 8, height + 29, width + 33, height + 30, -1);