From 540c42fed15eac0252f3fc0e7554e42b19d3cf1f Mon Sep 17 00:00:00 2001 From: ThisIsALegitUsername <73719631+ThisIsALegitUsername@users.noreply.github.com> Date: Mon, 27 Feb 2023 20:54:37 -0500 Subject: [PATCH] modesetting back & next & visual improvements --- src/main/java/dev/resent/visual/ui/ClickGUI.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/resent/visual/ui/ClickGUI.java b/src/main/java/dev/resent/visual/ui/ClickGUI.java index 892bd7a5..266b7507 100644 --- a/src/main/java/dev/resent/visual/ui/ClickGUI.java +++ b/src/main/java/dev/resent/visual/ui/ClickGUI.java @@ -98,8 +98,12 @@ public class ClickGUI extends GuiScreen { } if (s instanceof ModeSetting) { - if (isMouseInside(mouseX, mouseY, this.x + 24 + fr.getStringWidth(s.name + ": " + ((ModeSetting)s).getValue()), height - 9 + 50 + var, this.x + 24 + fr.getStringWidth(s.name + ": " + ((ModeSetting)s).getValue() + " >"), height - 9 + 50 + var + 9) && mouseButton == 0) - ((ModeSetting)s).cycle(false); + if(isMouseInside(mouseX, mouseY, this.x+360, height+40+var, this.x+370, height+50+var) && mouseButton == 0) { + ((ModeSetting)s).cycle(false); + } + if(isMouseInside(mouseX, mouseY, this.x+458, height+40+var, this.x+470, height+50+var) && mouseButton == 0) { + ((ModeSetting)s).cycle(true); + } } if(s instanceof CustomRectSettingDraw){ @@ -217,7 +221,12 @@ public class ClickGUI extends GuiScreen { } } if (s instanceof ModeSetting) { - fr.drawStringWithShadow(s.name + ": " + ((ModeSetting)s).getValue() + EnumChatFormatting.RED + " >", this.x + 18 + 6, height - 9 + 50 + var, -1); + fr.drawStringWithShadow(s.name, this.x + 18 + 6, height - 9 + 50 + var, -1); + fr.drawStringWithShadow(((ModeSetting)s).getValue(), width-100-fr.getStringWidth(((ModeSetting)s).getValue())/2, height+41+var, -1); + fr.drawStringWithShadow(EnumChatFormatting.RED + "<", width - 150, height-9+50+var, -1); + RenderUtils.drawRectOutline(this.x+370, height+39+var, this.x+360, height+50+var, -1); + fr.drawStringWithShadow(EnumChatFormatting.RED + ">", this.x+463, height-9+50+var, -1); + RenderUtils.drawRectOutline(this.x+458, height+40+var, this.x+470, height+50+var, -1); } var += 11;