Center words & add outlines

This commit is contained in:
ThisIsALegitUsername 2023-02-24 18:22:30 -05:00
parent 1b54ccf267
commit b33d3c3a7f
2 changed files with 9 additions and 6 deletions

View File

@ -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);

View File

@ -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);