some more ui stuffs

This commit is contained in:
ThisIsALegitUsername 2023-02-27 21:40:57 -05:00
parent 540c42fed1
commit d87867c13d
3 changed files with 18 additions and 12 deletions

View File

@ -17,7 +17,7 @@ public class HUD extends Mod {
//public static final ModeSetting rectTheme = new ModeSetting("Rectangle", "", "Classic", "Astolfo"); //public static final ModeSetting rectTheme = new ModeSetting("Rectangle", "", "Classic", "Astolfo");
public static final BooleanSetting round = new BooleanSetting("Rounded", "", true); public static final BooleanSetting round = new BooleanSetting("Rounded", "", true);
public static final BooleanSetting tshadow = new BooleanSetting("Text Shadow", "", true); public static final BooleanSetting tshadow = new BooleanSetting("Text Shadow", "", true);
public static final ModeSetting animationTheme = new ModeSetting("Animation", "Ease back in", "Ease back in", "Ease in out quad", "Elastic", "Smooth step", "Decelerate"); public static final ModeSetting animationTheme = new ModeSetting("Animation", "Ease back in", "Ease back in", "Ease in out quad", "Elastic", "Smooth step", "Decelerate", "None");
//public static final BooleanSetting animated = new BooleanSetting("Animated", "", true); //public static final BooleanSetting animated = new BooleanSetting("Animated", "", true);
} }

View File

@ -182,13 +182,15 @@ public class ClickGUI extends GuiScreen {
RenderUtils.drawRoundedRect(this.x + 10 + xo - 2 + 10, height - 2 - fh * -(off) + 50 - 2 - offset, this.x + 90 + xo + 22, height + 30 - fh * (-off) + 30 + 2 - offset, 4, m.isEnabled() ? Color.GREEN.getRGB() : Color.RED.getRGB(), true); RenderUtils.drawRoundedRect(this.x + 10 + xo - 2 + 10, height - 2 - fh * -(off) + 50 - 2 - offset, this.x + 90 + xo + 22, height + 30 - fh * (-off) + 30 + 2 - offset, 4, m.isEnabled() ? Color.GREEN.getRGB() : Color.RED.getRGB(), true);
} }
drawRect( if(ModManager.clickGui.guiTheme.getValue().equals("New")) {
this.x + 10 + xo - 1 + 10, drawRect(
height - 2 - fh * -(off) + 50 - 1 - offset, this.x + 10 + xo - 1 + 10,
this.x + 90 + xo - 1 + 22, height - 2 - fh * -(off) + 50 - 1 - offset,
height + 85 - (ModManager.clickGui.guiTheme.getValue().equals("New") ? 0 : 24) - fh * (-off) - offset, this.x + 90 + xo - 1 + 22,
/*isMouseInside(mouseX, mouseY, this.x + 10 + xo - 1 + 10, height - 2 - fh * -(off) + 50 - 1 - offset, this.x + 90 + xo - 1 + 22, height + 30 - fh * (-off) + 30 - 1 + 2 - offset) ? new Color(105, 105, 105, 65).getRGB() :*/ new Color(211, 211, 211, 65).getRGB() height + 85 - fh * (-off) - offset,
); /*isMouseInside(mouseX, mouseY, this.x + 10 + xo - 1 + 10, height - 2 - fh * -(off) + 50 - 1 - offset, this.x + 90 + xo - 1 + 22, height + 30 - fh * (-off) + 30 - 1 + 2 - offset) ? new Color(105, 105, 105, 65).getRGB() :*/ new Color(211, 211, 211, 65).getRGB()
);
}
if (m.isHasSetting()) { if (m.isHasSetting()) {
GlStateManager.enableBlend(); GlStateManager.enableBlend();
@ -224,9 +226,9 @@ public class ClickGUI extends GuiScreen {
fr.drawStringWithShadow(s.name, 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(((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); 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); //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); 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); //RenderUtils.drawRectOutline(this.x+458, height+40+var, this.x+470, height+50+var, -1);
} }
var += 11; var += 11;

View File

@ -12,7 +12,7 @@ import dev.resent.visual.ui.animation.impl.SmoothStepAnimation;
public class Theme { public class Theme {
public static int getFontColor(int id) { public static int getFontColor(int id) {
return getFontColor(id, 255); return getFontColor(getFontId(), 255);
} }
public static int getFontColor(int id, int opacity) { public static int getFontColor(int id, int opacity) {
@ -28,7 +28,7 @@ public class Theme {
} }
public static Animation getAnimation(int id, int ms, int endpoint, float easeAmount, float elasticity, float smooth, boolean moreElasticity) { public static Animation getAnimation(int id, int ms, int endpoint, float easeAmount, float elasticity, float smooth, boolean moreElasticity) {
switch (id) { switch (getAnimationId()) {
case 1: case 1:
return new EaseBackIn(ms, endpoint, easeAmount); return new EaseBackIn(ms, endpoint, easeAmount);
case 2: case 2:
@ -39,6 +39,8 @@ public class Theme {
return new DecelerateAnimation(ms, endpoint); return new DecelerateAnimation(ms, endpoint);
case 5: case 5:
return new SmoothStepAnimation(ms, endpoint); return new SmoothStepAnimation(ms, endpoint);
case 0:
return null;
} }
return null; return null;
@ -68,6 +70,8 @@ public class Theme {
return 4; return 4;
case "Smooth step": case "Smooth step":
return 5; return 5;
case "None":
return 0;
} }
return -1; return -1;
} }