ui improve

This commit is contained in:
ThisIsALegitUsername 2023-02-22 01:53:00 +00:00
parent 34e8196a24
commit 63a85f6276
4 changed files with 32253 additions and 16 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ import dev.resent.module.base.Mod;
import dev.resent.module.base.Mod.Category;
import dev.resent.module.setting.CustomRectSettingDraw;
@Module(name = "Cape", category = Category.MISC)
@Module(name = "Cape", category = Category.MISC, hasSetting = true)
public class Cape extends Mod{
public CustomRectSettingDraw open = new CustomRectSettingDraw("Choose cape", "Select which cape you want to use"){
@Override

View File

@ -80,21 +80,17 @@ public class ClickGUI extends GuiScreen {
if (modWatching != null) {
int var = 0;
for (int asdf = 0; asdf < this.modWatching.settings.size(); asdf++) {
BooleanSetting b;
ModeSetting m;
Setting s = this.modWatching.settings.get(asdf);
if (s instanceof BooleanSetting) {
b = (BooleanSetting) s;
if (isMouseInside(mouseX, mouseY, this.x + 13, height - 9 + 50 - offset + var + 1, this.x + 20, height - 9 + 50 + 9 - offset + var - 1) && mouseButton == 0) {
b.toggle();
((BooleanSetting)s).toggle();
}
}
if (s instanceof ModeSetting) {
m = (ModeSetting) s;
if (isMouseInside(mouseX, mouseY, this.x + 24, height - 9 + 50 + var, this.x + 24 + fr.getStringWidth(s.name + ": " + m.getValue()), height - 9 + 50 + var + 9) && mouseButton == 0)
m.next();
if (isMouseInside(mouseX, mouseY, this.x + 24, height - 9 + 50 + var, this.x + 24 + fr.getStringWidth(s.name + ": " + ((ModeSetting)s).getValue()), height - 9 + 50 + var + 9) && mouseButton == 0)
((ModeSetting)s).next();
}
if(s instanceof CustomRectSettingDraw){
@ -183,14 +179,11 @@ public class ClickGUI extends GuiScreen {
fr.drawStringWithShadow("Resent - " + modWatching.getName(), GuiScreen.width / 2 - (fr.getStringWidth("Resent - " + modWatching.getName()) / 2), height + 29 - 9 - 2, -1);
for (int amogus = 0; amogus < this.modWatching.settings.size(); amogus++) {
ModeSetting mo;
BooleanSetting b;
Setting s = this.modWatching.settings.get(amogus);
if (s instanceof BooleanSetting) {
b = (BooleanSetting) s;
drawRect(this.x + 11, height - 9 + 50 + var, this.x + 19, height - 9 + 50 + 9 + var - 1, isMouseInside(mouseX, mouseY, this.x + 11, height - 9 + 50 + var, this.x + 19, height - 9 + 50 + 9 + var - 1) ? new Color(211, 211, 211, 65).getRGB() : new Color(105, 105, 105, 65).getRGB());
if (b.getValue()) {
if (((BooleanSetting)s).getValue()) {
GlStateManager.color(1, 1, 1);
mc.getTextureManager().bindTexture(new ResourceLocation("eagler:gui/check.png"));
Gui.drawModalRectWithCustomSizedTexture(this.x + 9, height + 39 + var, 0, 0, 12, 12, 12, 12);
@ -198,10 +191,9 @@ public class ClickGUI extends GuiScreen {
}
if (s instanceof ModeSetting) {
mo = (ModeSetting) s;
fr.drawStringWithShadow(s.name + ": " + mo.getValue(), this.x + 18 + 6, height - 9 + 50 + var, -1);
fr.drawStringWithShadow(s.name + ": " + ((ModeSetting)s).getValue(), this.x + 18 + 6, height - 9 + 50 + var, -1);
} else if(s instanceof CustomRectSettingDraw){
Gui.drawRect(x+20, height+41+var, x+24+fr.getStringWidth(s.name), height+var+50, new Color(255, 255, 255, 70).getRGB());
Gui.drawRect(x+20, height+36.5+var, x+28+fr.getStringWidth(s.name), height+var+54.5, new Color(255, 255, 255, 70).getRGB());
fr.drawStringWithShadow(s.name, this.x + 24, height +41 + var, -1);
}