From edbc053ebb0ae08e89a37c85beb33ececa3f4eaa Mon Sep 17 00:00:00 2001 From: whats this? <105464811+gatooooooo@users.noreply.github.com> Date: Tue, 31 Dec 2024 23:12:19 +0000 Subject: [PATCH] fix background manager and prepare glide for a big change --- .../me/eldodebug/soar/gui/GuiGameMenu.java | 22 +++++------ .../eldodebug/soar/gui/GuiSplashScreen.java | 4 +- .../me/eldodebug/soar/gui/GuiWaypoint.java | 6 +-- .../soar/gui/mainmenu/GuiGlideMainMenu.java | 17 ++++---- .../gui/mainmenu/impl/BackgroundScene.java | 39 ++++++++++++------- .../soar/gui/mainmenu/impl/MainScene.java | 4 +- .../impl/welcome/AccentColorSelectScene.java | 4 +- .../soar/gui/modmenu/GuiModMenu.java | 10 ++--- .../category/impl/CosmeticsCategory.java | 4 +- .../modmenu/category/impl/HomeCategory.java | 10 ++--- .../modmenu/category/impl/ModuleCategory.java | 14 +++---- .../category/impl/ProfileCategory.java | 12 +++--- .../category/impl/ScreenshotCategory.java | 8 ++-- .../category/impl/SettingCategory.java | 6 +-- .../impl/setting/impl/AppearanceScene.java | 6 +-- .../impl/setting/impl/LanguageScene.java | 6 +-- .../soar/management/mods/SimpleHUDMod.java | 4 +- .../management/mods/impl/CPSDisplayMod.java | 4 +- .../soar/management/mods/impl/ClockMod.java | 4 +- .../management/mods/impl/ComboCounterMod.java | 4 +- .../soar/management/mods/impl/CompassMod.java | 4 +- .../soar/management/mods/impl/CoordsMod.java | 4 +- .../management/mods/impl/DayCounterMod.java | 4 +- .../management/mods/impl/FPSDisplayMod.java | 4 +- .../mods/impl/HealthDisplayMod.java | 4 +- .../management/mods/impl/MemoryUsageMod.java | 4 +- .../management/mods/impl/NameDisplayMod.java | 4 +- .../management/mods/impl/PingDisplayMod.java | 4 +- .../mods/impl/PlayTimeDisplayMod.java | 4 +- .../mods/impl/PlayerCounterMod.java | 4 +- .../mods/impl/PotionCounterMod.java | 4 +- .../management/mods/impl/ReachDisplayMod.java | 4 +- .../mods/impl/ServerIPDisplayMod.java | 4 +- .../management/mods/impl/SessionInfoMod.java | 8 ++-- .../management/mods/impl/SpeedometerMod.java | 4 +- .../management/mods/impl/StopwatchMod.java | 4 +- .../management/mods/impl/TargetInfoMod.java | 6 +-- .../mods/impl/WeatherDisplayMod.java | 10 ++--- .../management/nanovg/font/FontManager.java | 2 +- .../soar/management/nanovg/font/Fonts.java | 4 +- .../font/{Icon.java => LegacyIcon.java} | 2 +- .../management/notification/Notification.java | 2 +- .../notification/NotificationType.java | 12 +++--- .../remote/changelog/ChangelogType.java | 11 +++--- .../soar/ui/comp/impl/CompImageSelect.java | 4 +- .../soar/ui/comp/impl/CompSoundSelect.java | 4 +- .../comp/impl/field/CompMainMenuTextBox.java | 2 +- .../ui/comp/impl/field/CompSearchBox.java | 4 +- 48 files changed, 163 insertions(+), 156 deletions(-) rename src/main/java/me/eldodebug/soar/management/nanovg/font/{Icon.java => LegacyIcon.java} (99%) diff --git a/src/main/java/me/eldodebug/soar/gui/GuiGameMenu.java b/src/main/java/me/eldodebug/soar/gui/GuiGameMenu.java index 4ecb7d4..636388f 100644 --- a/src/main/java/me/eldodebug/soar/gui/GuiGameMenu.java +++ b/src/main/java/me/eldodebug/soar/gui/GuiGameMenu.java @@ -3,7 +3,7 @@ import me.eldodebug.soar.Glide; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.animation.normal.Animation; import me.eldodebug.soar.utils.animation.normal.Direction; import me.eldodebug.soar.utils.animation.normal.easing.EaseInOutCirc; @@ -57,32 +57,32 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { private void drawNanoVG(NanoVGManager nvg) { nvg.drawRect(-5, -5, scaledWidth + 10, scaledHeight + 10, new Color(0,0,0, 140)); - nvg.drawText(Icon.ARROW_LEFT, x, y + 5, new Color(255,255,255, 140),11, Fonts.ICON); - nvg.drawCenteredText("Game Menu", centre, y + 5, new Color(255,255,255, 200), 13, Fonts.MEDIUM); + nvg.drawText(LegacyIcon.ARROW_LEFT, x, y + 5, new Color(255,255,255, 140),11, Fonts.LEGACYICON); + nvg.drawCenteredText("Game Menu", centre, y + 5, new Color(255,255,255, 200), 13, Fonts.DEMIBOLD); float standardPadding = 29.5f; float offset = 29.5F; - drawButton(nvg, "Minecraft Options", Icon.SLIDERS, offset); + drawButton(nvg, "Minecraft Options", LegacyIcon.SLIDERS, offset); offset += standardPadding; if(this.mc.isSingleplayer() && !this.mc.getIntegratedServer().getPublic()){ - drawButton(nvg, "Open to Lan", Icon.USERS, offset); + drawButton(nvg, "Open to Lan", LegacyIcon.USERS, offset); } else { - drawButton(nvg, "Edit Hud", Icon.LAYOUT, offset); + drawButton(nvg, "Edit Hud", LegacyIcon.LAYOUT, offset); } offset += standardPadding; - drawButton(nvg, "Statistics", Icon.ARCHIVE, offset); + drawButton(nvg, "Statistics", LegacyIcon.ARCHIVE, offset); offset += standardPadding; - drawButton(nvg, "Achievements", Icon.MAP, offset); + drawButton(nvg, "Achievements", LegacyIcon.MAP, offset); offset += standardPadding; - drawButton(nvg, "Open Glide Menu", Icon.SOAR, offset); + drawButton(nvg, "Open Glide Menu", LegacyIcon.SOAR, offset); offset += standardPadding; - drawButton(nvg, !this.mc.isIntegratedServerRunning() ? "Disconnect" : "Return to Main Menu", Icon.LOGOUT, offset); + drawButton(nvg, !this.mc.isIntegratedServerRunning() ? "Disconnect" : "Return to Main Menu", LegacyIcon.LOGOUT, offset); } private void drawButton(NanoVGManager nvg, String s, String i, Float offset){ nvg.drawRoundedRect(x, y + offset, width , 22, 6, new Color(230, 230, 230, 80)); float startX = (nvg.getTextWidth(s, 9.5F, Fonts.MEDIUM) + 14) /2; - nvg.drawText(i, centre - startX, y + offset + 5.5F, Color.WHITE, 9.5F, Fonts.ICON); + nvg.drawText(i, centre - startX, y + offset + 5.5F, Color.WHITE, 9.5F, Fonts.LEGACYICON); nvg.drawText(s, centre - startX + 14, y + offset + 7F, Color.WHITE, 9.5F, Fonts.MEDIUM); } diff --git a/src/main/java/me/eldodebug/soar/gui/GuiSplashScreen.java b/src/main/java/me/eldodebug/soar/gui/GuiSplashScreen.java index 9af4e0c..5586ec9 100644 --- a/src/main/java/me/eldodebug/soar/gui/GuiSplashScreen.java +++ b/src/main/java/me/eldodebug/soar/gui/GuiSplashScreen.java @@ -7,7 +7,7 @@ import me.eldodebug.soar.Glide; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.GlUtils; import me.eldodebug.soar.utils.animation.normal.Animation; import me.eldodebug.soar.utils.animation.normal.Direction; @@ -64,7 +64,7 @@ public void draw() { nvg.setupAndDraw(() -> { nvg.drawRect(0, 0, sr.getScaledWidth(), sr.getScaledHeight(), Color.BLACK); - nvg.drawCenteredText(Icon.SOAR, sr.getScaledWidth() / 2, (sr.getScaledHeight() / 2) - (nvg.getTextHeight(Icon.SOAR, 130, Fonts.ICON) / 2) - 1, new Color(255, 255, 255, (int) (fadeAnimation.getValue() * 255)), 130, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.SOAR, sr.getScaledWidth() / 2, (sr.getScaledHeight() / 2) - (nvg.getTextHeight(LegacyIcon.SOAR, 130, Fonts.LEGACYICON) / 2) - 1, new Color(255, 255, 255, (int) (fadeAnimation.getValue() * 255)), 130, Fonts.LEGACYICON); }); framebuffer.unbindFramebuffer(); diff --git a/src/main/java/me/eldodebug/soar/gui/GuiWaypoint.java b/src/main/java/me/eldodebug/soar/gui/GuiWaypoint.java index 9ff5e9e..5ccb2a6 100644 --- a/src/main/java/me/eldodebug/soar/gui/GuiWaypoint.java +++ b/src/main/java/me/eldodebug/soar/gui/GuiWaypoint.java @@ -11,7 +11,7 @@ import me.eldodebug.soar.management.color.palette.ColorType; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.management.waypoint.Waypoint; import me.eldodebug.soar.management.waypoint.WaypointManager; import me.eldodebug.soar.ui.comp.impl.field.CompTextBox; @@ -102,7 +102,7 @@ private void drawNanoVG(int mouseX, int mouseY, float partialTicks) { nvg.drawRoundedRect(x + 16, y + 14 + offsetY + 26, 18, 18, 4, waypoint.getColor()); nvg.drawText(waypoint.getName(), x + 40, y + 45.5F + offsetY, palette.getFontColor(ColorType.DARK), 9.5F, Fonts.REGULAR); - nvg.drawText(Icon.TRASH, x + 162, y + 44 + offsetY, palette.getMaterialRed(), 11, Fonts.ICON); + nvg.drawText(LegacyIcon.TRASH, x + 162, y + 44 + offsetY, palette.getMaterialRed(), 11, Fonts.LEGACYICON); offsetY+=38; index++; @@ -125,7 +125,7 @@ private void drawNanoVG(int mouseX, int mouseY, float partialTicks) { nvg.drawRoundedRect(x + width - 120 + offsetX, y + 84 + offsetY, 13, 13, 2, c); if(currentColor.equals(c)) { - nvg.drawText(Icon.CHECK, x + width - 118 + offsetX, y + 86.5F + offsetY, Color.WHITE, 9, Fonts.ICON); + nvg.drawText(LegacyIcon.CHECK, x + width - 118 + offsetX, y + 86.5F + offsetY, Color.WHITE, 9, Fonts.LEGACYICON); } offsetX+=17; diff --git a/src/main/java/me/eldodebug/soar/gui/mainmenu/GuiGlideMainMenu.java b/src/main/java/me/eldodebug/soar/gui/mainmenu/GuiGlideMainMenu.java index d1f2579..aff45bf 100644 --- a/src/main/java/me/eldodebug/soar/gui/mainmenu/GuiGlideMainMenu.java +++ b/src/main/java/me/eldodebug/soar/gui/mainmenu/GuiGlideMainMenu.java @@ -1,7 +1,6 @@ package me.eldodebug.soar.gui.mainmenu; import java.awt.Color; -import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -12,11 +11,10 @@ import me.eldodebug.soar.Glide; import me.eldodebug.soar.gui.mainmenu.impl.BackgroundScene; import me.eldodebug.soar.gui.mainmenu.impl.MainScene; -import me.eldodebug.soar.management.color.palette.ColorPalette; import me.eldodebug.soar.management.event.impl.EventRenderNotification; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.management.profile.mainmenu.impl.Background; import me.eldodebug.soar.management.profile.mainmenu.impl.CustomBackground; import me.eldodebug.soar.management.profile.mainmenu.impl.DefaultBackground; @@ -27,7 +25,6 @@ import me.eldodebug.soar.utils.mouse.MouseUtils; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.util.ResourceLocation; public class GuiGlideMainMenu extends GuiScreen { @@ -137,18 +134,18 @@ private void drawButtons(int mouseX, int mouseY, ScaledResolution sr, NanoVGMana closeFocusAnimation.setAnimation(MouseUtils.isInside(mouseX, mouseY, sr.getScaledWidth() - 28, 6, 22, 22) ? 1.0F : 0.0F, 16); nvg.drawRoundedRect(sr.getScaledWidth() - 28, 6, 22, 22, 4, this.getBackgroundColor()); - nvg.drawCenteredText(Icon.X, sr.getScaledWidth() - 19F, 8F, new Color(255, 255 - (int) (closeFocusAnimation.getValue() * 200), 255 - (int) (closeFocusAnimation.getValue() * 200)), 18, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.X, sr.getScaledWidth() - 19F, 8F, new Color(255, 255 - (int) (closeFocusAnimation.getValue() * 200), 255 - (int) (closeFocusAnimation.getValue() * 200)), 18, Fonts.LEGACYICON); backgroundSelectFocusAnimation.setAnimation(MouseUtils.isInside(mouseX, mouseY, sr.getScaledWidth() - 28 - 28, 6, 22, 22) ? 1.0F : 0.0F, 16); nvg.drawRoundedRect(sr.getScaledWidth() - 28 - 28, 6, 22, 22, 4, this.getBackgroundColor()); - nvg.drawCenteredText(Icon.IMAGE, sr.getScaledWidth() - 19F - 26.5F, 9.5F, new Color(255 - (int) (backgroundSelectFocusAnimation.getValue() * 200), 255, 255 - (int) (backgroundSelectFocusAnimation.getValue() * 200)), 15, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.IMAGE, sr.getScaledWidth() - 19F - 26.5F, 9.5F, new Color(255 - (int) (backgroundSelectFocusAnimation.getValue() * 200), 255, 255 - (int) (backgroundSelectFocusAnimation.getValue() * 200)), 15, Fonts.LEGACYICON); } private void drawSplashScreen(ScaledResolution sr, NanoVGManager nvg) { if(fadeIconAnimation == null) { - fadeIconAnimation = new DecelerateAnimation(1000, 1); + fadeIconAnimation = new DecelerateAnimation(100, 1); fadeIconAnimation.setDirection(Direction.FORWARDS); fadeIconAnimation.reset(); } @@ -156,13 +153,13 @@ private void drawSplashScreen(ScaledResolution sr, NanoVGManager nvg) { if(fadeIconAnimation != null) { if(fadeIconAnimation.isDone(Direction.FORWARDS) && fadeBackgroundAnimation == null) { - fadeBackgroundAnimation = new DecelerateAnimation(1000, 1); + fadeBackgroundAnimation = new DecelerateAnimation(500, 1); fadeBackgroundAnimation.setDirection(Direction.FORWARDS); fadeBackgroundAnimation.reset(); } nvg.drawRect(0, 0, sr.getScaledWidth(), sr.getScaledHeight(), new Color(0, 0, 0, fadeBackgroundAnimation != null ? (int) (255 - (fadeBackgroundAnimation.getValue() * 255)) : 255)); - nvg.drawCenteredText(Icon.SOAR, sr.getScaledWidth() / 2, (sr.getScaledHeight() / 2) - (nvg.getTextHeight(Icon.SOAR, 130, Fonts.ICON) / 2) - 1, new Color(255, 255, 255, (int) (255 - (fadeIconAnimation.getValue() * 255))), 130, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.SOAR, sr.getScaledWidth() / 2, (sr.getScaledHeight() / 2) - (nvg.getTextHeight(LegacyIcon.SOAR, 130, Fonts.LEGACYICON) / 2) - 1, new Color(255, 255, 255, (int) (255 - (fadeIconAnimation.getValue() * 255))), 130, Fonts.LEGACYICON); } } @@ -181,7 +178,7 @@ public void mouseClicked(int mouseX, int mouseY, int mouseButton) { mc.shutdown(); } - if(MouseUtils.isInside(mouseX, mouseY, sr.getScaledWidth() - 28 - 28, 6, 22, 22)) { + if(MouseUtils.isInside(mouseX, mouseY, sr.getScaledWidth() - 28 - 28, 6, 22, 22) && !this.getCurrentScene().equals(getSceneByClass(BackgroundScene.class))) { this.setCurrentScene(this.getSceneByClass(BackgroundScene.class)); } diff --git a/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/BackgroundScene.java b/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/BackgroundScene.java index ea23241..437ea95 100644 --- a/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/BackgroundScene.java +++ b/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/BackgroundScene.java @@ -4,6 +4,10 @@ import java.io.File; import java.io.IOException; +import me.eldodebug.soar.utils.animation.normal.Animation; +import me.eldodebug.soar.utils.animation.normal.Direction; +import me.eldodebug.soar.utils.animation.normal.easing.EaseInOutCirc; +import me.eldodebug.soar.utils.buffer.ScreenAnimation; import org.lwjgl.input.Keyboard; import me.eldodebug.soar.Glide; @@ -14,8 +18,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; -import me.eldodebug.soar.management.notification.NotificationType; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.management.profile.mainmenu.BackgroundManager; import me.eldodebug.soar.management.profile.mainmenu.impl.Background; import me.eldodebug.soar.management.profile.mainmenu.impl.CustomBackground; @@ -28,10 +31,16 @@ public class BackgroundScene extends MainMenuScene { + private Animation introAnimation; + private final ScreenAnimation screenAnimation = new ScreenAnimation(); private Scroll scroll = new Scroll(); - public BackgroundScene(GuiGlideMainMenu parent) { - super(parent); + public BackgroundScene(GuiGlideMainMenu parent) {super(parent);} + + @Override + public void initScene() { + introAnimation = new EaseInOutCirc(250, 1.0F); + introAnimation.setDirection(Direction.FORWARDS); } @Override @@ -39,8 +48,10 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { ScaledResolution sr = new ScaledResolution(mc); Glide instance = Glide.getInstance(); NanoVGManager nvg = instance.getNanoVGManager(); - - nvg.setupAndDraw(() -> drawNanoVG(mouseX, mouseY, sr, instance, nvg)); + screenAnimation.wrap(() -> drawNanoVG(mouseX, mouseY, sr, instance, nvg), 0, 0, sr.getScaledWidth(), sr.getScaledHeight(), 2 - introAnimation.getValueFloat(), Math.min(introAnimation.getValueFloat(), 1), false); + if(introAnimation.isDone(Direction.BACKWARDS)) { + this.setCurrentScene(this.getSceneByClass(MainScene.class)); + } } private void drawNanoVG(int mouseX, int mouseY, ScaledResolution sr, Glide instance, NanoVGManager nvg) { @@ -60,8 +71,7 @@ private void drawNanoVG(int mouseX, int mouseY, ScaledResolution sr, Glide insta scroll.onAnimation(); nvg.drawRoundedRect(acX, acY, acWidth, acHeight, 8, this.getBackgroundColor()); - nvg.drawRect(acX, acY + 24, acWidth, 0.8F, Color.WHITE); - nvg.drawCenteredText(TranslateText.SELECT_BACKGROUND.getText(), acX + (acWidth / 2), acY + 8, Color.WHITE, 14, Fonts.REGULAR); + nvg.drawCenteredText(TranslateText.SELECT_BACKGROUND.getText(), acX + (acWidth / 2), acY + 8, Color.WHITE, 14, Fonts.DEMIBOLD); nvg.save(); nvg.scissor(acX, acY + 25, acWidth, acHeight - 25); @@ -77,7 +87,7 @@ private void drawNanoVG(int mouseX, int mouseY, ScaledResolution sr, Glide insta // Draw selection highlight and glow effect if(isSelected) { // Outer glow - nvg.drawRoundedRect(itemX - 3, itemY - 3, itemWidth + 6, itemHeight + 6, 8, new Color(255, 255, 255, 40)); + nvg.drawGradientShadow(itemX - 1, itemY - 1, itemWidth + 2, itemHeight + 2, 7, new Color(255, 255, 255, 180),new Color(255, 255, 255, 180)); // Inner highlight nvg.drawRoundedRect(itemX - 1, itemY - 1, itemWidth + 2, itemHeight + 2, 7, new Color(255, 255, 255, 180)); } @@ -92,7 +102,7 @@ private void drawNanoVG(int mouseX, int mouseY, ScaledResolution sr, Glide insta if(bg.getId() == 999) { nvg.drawRoundedRect(acX + 11 + offsetX, acY + 35 + offsetY, 102.5F, 57.5F, 6, Color.BLACK); - nvg.drawCenteredText(Icon.PLUS, acX + 10 + offsetX + (102.5F / 2), acY + 42.5F + offsetY, Color.WHITE, 26, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.PLUS, acX + 10 + offsetX + (102.5F / 2), acY + 42.5F + offsetY, Color.WHITE, 26, Fonts.LEGACYICON); } else { nvg.drawRoundedImage(defBackground.getImage(), acX + 11 + offsetX, acY + 35 + offsetY, 102.5F, 57.5F, 6); } @@ -104,7 +114,7 @@ private void drawNanoVG(int mouseX, int mouseY, ScaledResolution sr, Glide insta cusBackground.getTrashAnimation().setAnimation(MouseUtils.isInside(mouseX, mouseY, acX + 11 + offsetX, acY + 35 + offsetY + scroll.getValue(), 102.5F, 57.5F) ? 1.0F : 0.0F, 16); nvg.drawRoundedImage(cusBackground.getImage(), acX + 11 + offsetX, acY + 35 + offsetY, 102.5F, 57.5F, 6); - nvg.drawText(Icon.TRASH, acX + offsetX + 100, acY + 38 + offsetY, palette.getMaterialRed((int) (cusBackground.getTrashAnimation().getValue() * 255)), 10, Fonts.ICON); + nvg.drawText(LegacyIcon.TRASH, acX + offsetX + 100, acY + 38 + offsetY, palette.getMaterialRed((int) (cusBackground.getTrashAnimation().getValue() * 255)), 10, Fonts.LEGACYICON); } nvg.drawRoundedRectVarying(acX + offsetX + 11, acY + offsetY + 76.5F, 102.5F, 16, 0, 0, 6, 6, this.getBackgroundColor()); @@ -142,10 +152,13 @@ public void mouseClicked(int mouseX, int mouseY, int mouseButton) { int offsetY = (int) (0 + scroll.getValue()); int index = 1; + if(!MouseUtils.isInside(mouseX, mouseY, acX, acY, acWidth, acHeight) && !MouseUtils.isInside(mouseX, mouseY, sr.getScaledWidth() - 28 - 28, 6, 22, 22)){ + introAnimation.setDirection(Direction.BACKWARDS); + } + for(Background bg : backgroundManager.getBackgrounds()) { if(mouseButton == 0) { - if(MouseUtils.isInside(mouseX, mouseY, acX + 11 + offsetX, acY + 35 + offsetY, 102.5F, 57.5F)) { if(bg.getId() == 999) { @@ -193,7 +206,7 @@ public void mouseClicked(int mouseX, int mouseY, int mouseButton) { @Override public void keyTyped(char typedChar, int keyCode) { if(keyCode == Keyboard.KEY_ESCAPE) { - this.setCurrentScene(this.getSceneByClass(MainScene.class)); + introAnimation.setDirection(Direction.BACKWARDS); } } } \ No newline at end of file diff --git a/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/MainScene.java b/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/MainScene.java index 86522aa..4462d21 100644 --- a/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/MainScene.java +++ b/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/MainScene.java @@ -8,7 +8,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.mouse.MouseUtils; import net.minecraft.client.gui.GuiMultiplayer; import net.minecraft.client.gui.GuiOptions; @@ -40,7 +40,7 @@ private void drawNanoVG(NanoVGManager nvg) { float yPos = sr.getScaledHeight() / 2 - 22; - nvg.drawCenteredText(Icon.SOAR, sr.getScaledWidth() / 2, sr.getScaledHeight() / 2 - (nvg.getTextHeight(Icon.SOAR, 54, Fonts.ICON) / 2) - 60, Color.WHITE, 54, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.SOAR, sr.getScaledWidth() / 2, sr.getScaledHeight() / 2 - (nvg.getTextHeight(LegacyIcon.SOAR, 54, Fonts.LEGACYICON) / 2) - 60, Color.WHITE, 54, Fonts.LEGACYICON); nvg.drawRoundedRect(sr.getScaledWidth() / 2 - (180 / 2), yPos, 180, 20, 4.5F, this.getBackgroundColor()); nvg.drawCenteredText(TranslateText.SINGLEPLAYER.getText(), sr.getScaledWidth() / 2, yPos + 6.5F, Color.WHITE, 9.5F, Fonts.REGULAR); diff --git a/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/welcome/AccentColorSelectScene.java b/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/welcome/AccentColorSelectScene.java index dc381f3..e0816d0 100644 --- a/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/welcome/AccentColorSelectScene.java +++ b/src/main/java/me/eldodebug/soar/gui/mainmenu/impl/welcome/AccentColorSelectScene.java @@ -9,7 +9,7 @@ import me.eldodebug.soar.management.color.ColorManager; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.ColorUtils; import me.eldodebug.soar.utils.animation.normal.Animation; import me.eldodebug.soar.utils.animation.normal.Direction; @@ -93,7 +93,7 @@ private void drawNanoVG() { color.getAnimation().setAnimation(color.equals(currentColor) ? 1.0F : 0.0F, 16); - nvg.drawCenteredText(Icon.CHECK, x + offsetX + 10 + (32 / 2), y + offsetY + 40 + 8, new Color(255, 255, 255, (int) (color.getAnimation().getValue() * 255)), 16, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.CHECK, x + offsetX + 10 + (32 / 2), y + offsetY + 40 + 8, new Color(255, 255, 255, (int) (color.getAnimation().getValue() * 255)), 16, Fonts.LEGACYICON); offsetX+=40; diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/GuiModMenu.java b/src/main/java/me/eldodebug/soar/gui/modmenu/GuiModMenu.java index f734d9d..954c166 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/GuiModMenu.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/GuiModMenu.java @@ -22,7 +22,7 @@ import me.eldodebug.soar.management.event.impl.EventRenderNotification; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.ui.comp.impl.field.CompSearchBox; import me.eldodebug.soar.utils.MathUtils; import me.eldodebug.soar.utils.animation.normal.Animation; @@ -124,11 +124,11 @@ private void drawNanoVG(int mouseX, int mouseY, float partialTicks) { nvg.drawRoundedRect(x, y, width, height, 12, palette.getBackgroundColor(ColorType.NORMAL)); nvg.drawRoundedRectVarying(x, y, 32, height, 12, 0, 12, 0, palette.getBackgroundColor(ColorType.DARK)); nvg.drawGradientRoundedRect(x + 5, y + 7, 22, 22, 11, currentColor.getColor1(), currentColor.getColor2()); - nvg.drawText(Icon.SOAR, x + 8, y + 10, Color.WHITE, 16, Fonts.ICON); + nvg.drawText(LegacyIcon.SOAR, x + 8, y + 10, Color.WHITE, 16, Fonts.LEGACYICON); if(currentCategory.isShowTitle()) { nvg.save(); nvg.translate(currentCategory.getTextAnimation().getValue() * 15, 0); - nvg.drawText(currentCategory.getName(), x + 32, y + 10, palette.getFontColor(ColorType.DARK, (int) (currentCategory.getTextAnimation().getValue() * 255)), 15, Fonts.MEDIUM); + nvg.drawText(currentCategory.getName(), x + 32, y + 10, palette.getFontColor(ColorType.DARK, (int) (currentCategory.getTextAnimation().getValue() * 255)), 15, Fonts.DEMIBOLD); nvg.restore(); } @@ -146,7 +146,7 @@ private void drawNanoVG(int mouseX, int mouseY, float partialTicks) { c.getTextAnimation().setAnimation(c.equals(currentCategory) ? 1.0F : 0.0F, 14); - nvg.drawText(c.getIcon(), x + 9F, y + 42 + offsetY, textColor, 14, Fonts.ICON); + nvg.drawText(c.getIcon(), x + 9F, y + 42 + offsetY, textColor, 14, Fonts.LEGACYICON); offsetY+=30; } @@ -154,7 +154,7 @@ private void drawNanoVG(int mouseX, int mouseY, float partialTicks) { nvg.restore(); nvg.drawGradientRoundedRect(x + 5.5F, y + height - 30, 21, 21, 4, currentColor.getColor1(), currentColor.getColor2()); - nvg.drawText(Icon.LAYOUT, x + 9, y + height - 26.5F, Color.WHITE, 14, Fonts.ICON); + nvg.drawText(LegacyIcon.LAYOUT, x + 9, y + height - 26.5F, Color.WHITE, 14, Fonts.LEGACYICON); for(Category c : categories) { diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/CosmeticsCategory.java b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/CosmeticsCategory.java index 1405a9a..86c8aef 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/CosmeticsCategory.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/CosmeticsCategory.java @@ -17,7 +17,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.ColorUtils; import me.eldodebug.soar.utils.SearchUtils; import me.eldodebug.soar.utils.mouse.MouseUtils; @@ -27,7 +27,7 @@ public class CosmeticsCategory extends Category { private CapeCategory currentCategory; public CosmeticsCategory(GuiModMenu parent) { - super(parent, TranslateText.COSMETICS, Icon.SHOPPING, true, true); + super(parent, TranslateText.COSMETICS, LegacyIcon.SHOPPING, true, true); } @Override diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/HomeCategory.java b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/HomeCategory.java index 21df3c4..dc3c665 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/HomeCategory.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/HomeCategory.java @@ -7,7 +7,6 @@ import me.eldodebug.soar.Glide; import me.eldodebug.soar.gui.modmenu.GuiModMenu; import me.eldodebug.soar.gui.modmenu.category.Category; -import me.eldodebug.soar.management.language.Language; import me.eldodebug.soar.management.remote.changelog.Changelog; import me.eldodebug.soar.management.remote.changelog.ChangelogManager; import me.eldodebug.soar.management.color.AccentColor; @@ -17,8 +16,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; -import me.eldodebug.soar.management.remote.discord.DiscordManager; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.management.remote.discord.DiscordStats; import me.eldodebug.soar.utils.mouse.MouseUtils; import me.eldodebug.soar.utils.mouse.Scroll; @@ -26,7 +24,7 @@ public class HomeCategory extends Category { public HomeCategory(GuiModMenu parent) { - super(parent, TranslateText.HOME, Icon.HOME, false, false); + super(parent, TranslateText.HOME, LegacyIcon.HOME, false, false); } private Scroll changelogScroll = new Scroll(); @@ -66,7 +64,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { for(Changelog c : changelogManager.getChangelogs()) { float tbSize = nvg.getTextBoxHeight(c.getText(), 8, Fonts.MEDIUM, 174 - 33); nvg.drawRoundedRect(this.getX() + 230 + 8, this.getY() + 40 + offsetY + ((tbSize/2)-4), 13, 13, 7F, c.getType().getColor()); - nvg.drawCenteredText(c.getType().getText(), this.getX() + 230 + 8 + (13 / 2), this.getY() + 42F + offsetY + ((tbSize/2)-4), Color.WHITE, 9, Fonts.ICON); + nvg.drawCenteredText(c.getType().getText(), this.getX() + 230 + 8 + (13 / 2), this.getY() + 42F + offsetY + ((tbSize/2)-4), Color.WHITE, 9, Fonts.LEGACYICON); nvg.drawTextBox(c.getText(), this.getX() + 230 + 25, this.getY() + 43F + offsetY, 174 - 33, palette.getFontColor(ColorType.DARK), 8, Fonts.MEDIUM); offsetY+= (int) (tbSize + 9); } @@ -88,7 +86,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { nvg.drawRoundedRect(discordStartX, discordStartY, discordWidth, 86, 8, palette.getBackgroundColor(ColorType.DARK)); // Discord branding nvg.drawRoundedRectVarying(discordStartX + discordWidth - 22, discordStartY, 22, 22, 0, 8, 8, 0, new Color(114, 137, 214)); - nvg.drawCenteredText(Icon.DISCORD, discordStartX + discordWidth - 11, discordStartY + 4, Color.WHITE, 14F, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.DISCORD, discordStartX + discordWidth - 11, discordStartY + 4, Color.WHITE, 14F, Fonts.LEGACYICON); // txt nvg.drawText(TranslateText.JOIN_OUR_DISCORD_SERVER.getText(), discordStartX + standardPadding, discordStartY + standardPadding, palette.getFontColor(ColorType.DARK), 11F, Fonts.DEMIBOLD); nvg.drawTextBox(TranslateText.DISCORD_DESCRIPTION.getText(), discordStartX + standardPadding, discordStartY + 26, discordWidth - 16, palette.getFontColor(ColorType.DARK), 8, Fonts.REGULAR); diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ModuleCategory.java b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ModuleCategory.java index 8e6bb2c..c01d51c 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ModuleCategory.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ModuleCategory.java @@ -27,7 +27,7 @@ import me.eldodebug.soar.management.mods.settings.impl.TextSetting; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.ui.comp.Comp; import me.eldodebug.soar.ui.comp.impl.CompColorPicker; import me.eldodebug.soar.ui.comp.impl.CompComboBox; @@ -59,7 +59,7 @@ public class ModuleCategory extends Category { private ArrayList comps = new ArrayList(); public ModuleCategory(GuiModMenu parent) { - super(parent, TranslateText.MODULE, Icon.ARCHIVE, true, true); + super(parent, TranslateText.MODULE, LegacyIcon.ARCHIVE, true, true); } @Override @@ -143,8 +143,8 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { if(m.isBanable()){ nvg.drawText(m.getName(), this.getX() + 56, this.getY() + offsetY + 9F, palette.getFontColor(ColorType.DARK), 13, Fonts.MEDIUM); nvg.drawText(m.getDescription(), this.getX() + 56 + (nvg.getTextWidth(m.getName(), 13, Fonts.MEDIUM)) + 5, this.getY() + offsetY + 12, palette.getFontColor(ColorType.NORMAL), 9, Fonts.REGULAR); - nvg.drawText(Icon.INFO, this.getX() + 56, this.getY() + offsetY + 23, new Color(255, 145, 0), 9, Fonts.ICON); - nvg.drawText("This mod may be banable on some servers", this.getX() + 57 + (nvg.getTextWidth(Icon.INFO, 9, Fonts.ICON)) , this.getY() + offsetY + 24, new Color(255, 145, 0), 9, Fonts.REGULAR); + nvg.drawText(LegacyIcon.INFO, this.getX() + 56, this.getY() + offsetY + 23, new Color(255, 145, 0), 9, Fonts.LEGACYICON); + nvg.drawText("This mod may be banable on some servers", this.getX() + 57 + (nvg.getTextWidth(LegacyIcon.INFO, 9, Fonts.LEGACYICON)) , this.getY() + offsetY + 24, new Color(255, 145, 0), 9, Fonts.REGULAR); } else { nvg.drawText(m.getName(), this.getX() + 56, this.getY() + offsetY + 15F, palette.getFontColor(ColorType.DARK), 13, Fonts.MEDIUM); nvg.drawText(m.getDescription(), this.getX() + 56 + (nvg.getTextWidth(m.getName(), 13, Fonts.MEDIUM)) + 5, this.getY() + offsetY + 17, palette.getFontColor(ColorType.NORMAL), 9, Fonts.REGULAR); @@ -160,7 +160,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { nvg.restore(); if(modManager.getSettingsByMod(m) != null) { - nvg.drawText(Icon.SETTINGS, this.getX() + this.getWidth() - 39, this.getY() + offsetY + 13.5F, palette.getFontColor(ColorType.NORMAL), 13, Fonts.ICON); + nvg.drawText(LegacyIcon.SETTINGS, this.getX() + this.getWidth() - 39, this.getY() + offsetY + 13.5F, palette.getFontColor(ColorType.NORMAL), 13, Fonts.LEGACYICON); } } @@ -191,9 +191,9 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { nvg.save(); nvg.drawRoundedRect(this.getX() + 15, this.getY() + offsetY, this.getWidth() - 30, this.getHeight() - 30, 10, palette.getBackgroundColor(ColorType.DARK)); - nvg.drawText(Icon.CHEVRON_LEFT, this.getX() + 25, this.getY() + offsetY + 8, palette.getFontColor(ColorType.DARK), 13, Fonts.ICON); + nvg.drawText(LegacyIcon.CHEVRON_LEFT, this.getX() + 25, this.getY() + offsetY + 8, palette.getFontColor(ColorType.DARK), 13, Fonts.LEGACYICON); nvg.drawText(currentMod.getName(), this.getX() + 42, this.getY() + offsetY + 9, palette.getFontColor(ColorType.DARK), 13, Fonts.MEDIUM); - nvg.drawText(Icon.REFRESH, this.getX() + this.getWidth() - 39, this.getY() + offsetY + 7.5F, palette.getFontColor(ColorType.DARK), 13, Fonts.ICON); + nvg.drawText(LegacyIcon.REFRESH, this.getX() + this.getWidth() - 39, this.getY() + offsetY + 7.5F, palette.getFontColor(ColorType.DARK), 13, Fonts.LEGACYICON); offsetY = 44; diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ProfileCategory.java b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ProfileCategory.java index ea55b70..57ea9f0 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ProfileCategory.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ProfileCategory.java @@ -17,7 +17,7 @@ import me.eldodebug.soar.management.mods.ModManager; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.management.profile.Profile; import me.eldodebug.soar.management.profile.ProfileIcon; import me.eldodebug.soar.management.profile.ProfileManager; @@ -40,7 +40,7 @@ public class ProfileCategory extends Category { private CompTextBox serverIpBox = new CompTextBox(); public ProfileCategory(GuiModMenu parent) { - super(parent, TranslateText.PROFILE, Icon.EDIT, true, true); + super(parent, TranslateText.PROFILE, LegacyIcon.EDIT, true, true); } @Override @@ -126,15 +126,15 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { } if(p.getId() == 999) { - nvg.drawCenteredText(Icon.PLUS, this.getX() + offsetX + 14.5F + (123 / 2), this.getY() + offsetY + 13, palette.getFontColor(ColorType.DARK), 20, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.PLUS, this.getX() + offsetX + 14.5F + (123 / 2), this.getY() + offsetY + 13, palette.getFontColor(ColorType.DARK), 20, Fonts.LEGACYICON); }else { - nvg.drawText(Icon.STAR, this.getX() + 62 + offsetX, this.getY() + 29 + offsetY, palette.getMaterialYellow(), 11, Fonts.ICON); + nvg.drawText(LegacyIcon.STAR, this.getX() + 62 + offsetX, this.getY() + 29 + offsetY, palette.getMaterialYellow(), 11, Fonts.LEGACYICON); p.getStarAnimation().setAnimation(p.getType().equals(ProfileType.FAVORITE) ? 1.0F : 0.0F, 16); - nvg.drawText(Icon.STAR_FILL, this.getX() + 62 + offsetX, this.getY() + 29 + offsetY, palette.getMaterialYellow((int) (p.getStarAnimation().getValue() * 255)), 11, Fonts.ICON); + nvg.drawText(LegacyIcon.STAR_FILL, this.getX() + 62 + offsetX, this.getY() + 29 + offsetY, palette.getMaterialYellow((int) (p.getStarAnimation().getValue() * 255)), 11, Fonts.LEGACYICON); - nvg.drawText(Icon.TRASH, this.getX() + 62 + 14 + offsetX, this.getY() + 29 + offsetY, palette.getMaterialRed(), 11, Fonts.ICON); + nvg.drawText(LegacyIcon.TRASH, this.getX() + 62 + 14 + offsetX, this.getY() + 29 + offsetY, palette.getMaterialRed(), 11, Fonts.LEGACYICON); } offsetX+=133; diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ScreenshotCategory.java b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ScreenshotCategory.java index eb9455a..3ee0bc8 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ScreenshotCategory.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/ScreenshotCategory.java @@ -13,7 +13,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.management.screenshot.Screenshot; import me.eldodebug.soar.management.screenshot.ScreenshotManager; import me.eldodebug.soar.utils.ColorUtils; @@ -29,7 +29,7 @@ public class ScreenshotCategory extends Category { private SimpleAnimation trashAnimation = new SimpleAnimation(); public ScreenshotCategory(GuiModMenu parent) { - super(parent, TranslateText.SCREENSHOT, Icon.CAMERA, false, true); + super(parent, TranslateText.SCREENSHOT, LegacyIcon.CAMERA, false, true); } @Override @@ -76,7 +76,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { trashAnimation.setAnimation(MouseUtils.isInside(mouseX, mouseY, this.getX() + addX, this.getY() + addY, this.getWidth() - (addX * 2), this.getHeight() - (addY * 2) - 38) ? 1.0F : 0.0F, 16); nvg.drawRoundedImage(currentScreenshot.getImage(), this.getX() + addX, this.getY() + addY, this.getWidth() - (addX * 2), this.getHeight() - (addY * 2) - 38, 6); - nvg.drawText(Icon.TRASH, this.getX() + this.getWidth() - 59, this.getY() + addY + 6, palette.getMaterialRed((int) (trashAnimation.getValue() * 255)), 12, Fonts.ICON); + nvg.drawText(LegacyIcon.TRASH, this.getX() + this.getWidth() - 59, this.getY() + addY + 6, palette.getMaterialRed((int) (trashAnimation.getValue() * 255)), 12, Fonts.LEGACYICON); addX = 58; @@ -134,7 +134,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { }else { nvg.drawRoundedRect(this.getX() + addX, this.getY() + addY, this.getWidth() - (addX * 2), this.getHeight() - (addY * 2) - 38, 6, palette.getBackgroundColor(ColorType.DARK)); - nvg.drawCenteredText(Icon.CAMERA, this.getX() + addX + ((this.getWidth() - (addX * 2)) / 2), this.getY() + 68, palette.getFontColor(ColorType.NORMAL), 64, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.CAMERA, this.getX() + addX + ((this.getWidth() - (addX * 2)) / 2), this.getY() + 68, palette.getFontColor(ColorType.NORMAL), 64, Fonts.LEGACYICON); addX = 58; diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/SettingCategory.java b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/SettingCategory.java index 9f4015e..d98705e 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/SettingCategory.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/SettingCategory.java @@ -15,7 +15,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.animation.normal.Animation; import me.eldodebug.soar.utils.animation.normal.Direction; import me.eldodebug.soar.utils.animation.normal.other.SmoothStepAnimation; @@ -29,7 +29,7 @@ public class SettingCategory extends Category { private SettingScene currentScene; public SettingCategory(GuiModMenu parent) { - super(parent, TranslateText.SETTINGS, Icon.SETTINGS, false, true); + super(parent, TranslateText.SETTINGS, LegacyIcon.SETTINGS, false, true); scenes.add(new AppearanceScene(this)); scenes.add(new LanguageScene(this)); @@ -73,7 +73,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { nvg.drawRoundedRect(this.getX() + 15, this.getY() + offsetY, this.getWidth() - 30, 40, 8, palette.getBackgroundColor(ColorType.DARK)); nvg.drawText(scene.getName(), this.getX() + 52, this.getY() + offsetY + 15F, palette.getFontColor(ColorType.DARK), 13, Fonts.MEDIUM); - nvg.drawText(scene.getIcon(), this.getX() + 26, this.getY() + offsetY + 14, palette.getFontColor(ColorType.DARK), 14, Fonts.ICON); + nvg.drawText(scene.getIcon(), this.getX() + 26, this.getY() + offsetY + 14, palette.getFontColor(ColorType.DARK), 14, Fonts.LEGACYICON); nvg.drawText(scene.getDescription(), this.getX() + (nvg.getTextWidth(scene.getName(), 14, Fonts.MEDIUM)) + 56, this.getY() + offsetY + 17, palette.getFontColor(ColorType.NORMAL), 9, Fonts.REGULAR); nvg.drawText(">", this.getX() + this.getWidth() - 32, this.getY() + offsetY + 17, palette.getFontColor(ColorType.NORMAL), 10, Fonts.MEDIUM); diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/setting/impl/AppearanceScene.java b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/setting/impl/AppearanceScene.java index b3fd9c3..d942694 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/setting/impl/AppearanceScene.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/setting/impl/AppearanceScene.java @@ -14,7 +14,7 @@ import me.eldodebug.soar.management.mods.impl.GlobalSettingsMod; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.ui.comp.impl.CompComboBox; import me.eldodebug.soar.utils.ColorUtils; import me.eldodebug.soar.utils.mouse.MouseUtils; @@ -27,7 +27,7 @@ public class AppearanceScene extends SettingScene { private CompComboBox modTheme; public AppearanceScene(SettingCategory parent) { - super(parent, TranslateText.APPEARANCE, TranslateText.APPEARANCE_DESCRIPTION, Icon.MONITOR); + super(parent, TranslateText.APPEARANCE, TranslateText.APPEARANCE_DESCRIPTION, LegacyIcon.MONITOR); } @Override @@ -98,7 +98,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { c.getAnimation().setAnimation(c.equals(currentColor) ? 1.0F : 0.0F, 16); - nvg.drawCenteredText(Icon.CHECK, this.getX() + offsetX + 12 + (32 / 2), this.getY() + 28 + 99, new Color(255, 255, 255, (int) (c.getAnimation().getValue() * 255)), 16, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.CHECK, this.getX() + offsetX + 12 + (32 / 2), this.getY() + 28 + 99, new Color(255, 255, 255, (int) (c.getAnimation().getValue() * 255)), 16, Fonts.LEGACYICON); offsetX+=40F; Index2++; diff --git a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/setting/impl/LanguageScene.java b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/setting/impl/LanguageScene.java index a00327a..f638403 100644 --- a/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/setting/impl/LanguageScene.java +++ b/src/main/java/me/eldodebug/soar/gui/modmenu/category/impl/setting/impl/LanguageScene.java @@ -11,7 +11,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.ColorUtils; import me.eldodebug.soar.utils.mouse.MouseUtils; import me.eldodebug.soar.utils.mouse.Scroll; @@ -19,7 +19,7 @@ public class LanguageScene extends SettingScene { public LanguageScene(SettingCategory parent) { - super(parent, TranslateText.LANGUAGE, TranslateText.LANGUAGE_DESCRIPTION, Icon.TRANSLATE); + super(parent, TranslateText.LANGUAGE, TranslateText.LANGUAGE_DESCRIPTION, LegacyIcon.TRANSLATE); } private Scroll categoryScroll = new Scroll(); @@ -52,7 +52,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { lang.getAnimation().setAnimation(lang.equals(languageManager.getCurrentLanguage()) ? 1.0F : 0.0F, 16); - nvg.drawText(Icon.CHECK, this.getX() + this.getWidth() - 28, this.getY() + 12 + offsetY, ColorUtils.applyAlpha(currentColor.getInterpolateColor(), (int) (lang.getAnimation().getValue() * 255)), 16, Fonts.ICON); + nvg.drawText(LegacyIcon.CHECK, this.getX() + this.getWidth() - 28, this.getY() + 12 + offsetY, ColorUtils.applyAlpha(currentColor.getInterpolateColor(), (int) (lang.getAnimation().getValue() * 255)), 16, Fonts.LEGACYICON); offsetY+=50; } diff --git a/src/main/java/me/eldodebug/soar/management/mods/SimpleHUDMod.java b/src/main/java/me/eldodebug/soar/management/mods/SimpleHUDMod.java index 3da8636..1aad5d2 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/SimpleHUDMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/SimpleHUDMod.java @@ -20,7 +20,7 @@ public void draw() { Glide instance = Glide.getInstance(); NanoVGManager nvg = instance.getNanoVGManager(); boolean hasIcon = getIcon() != null; - float addX = hasIcon ? this.getTextWidth(getIcon(), 9.5F, Fonts.ICON) + 4 : 0; + float addX = hasIcon ? this.getTextWidth(getIcon(), 9.5F, Fonts.LEGACYICON) + 4 : 0; if(getText() != null) { nvg.setupAndDraw(() -> { @@ -31,7 +31,7 @@ public void draw() { this.drawText(this.getText(), 5.5F + addX, 5.5F, 9, Fonts.REGULAR); if(hasIcon) { - this.drawText(getIcon(), 5.5F, 4F, 10.4F, Fonts.ICON); + this.drawText(getIcon(), 5.5F, 4F, 10.4F, Fonts.LEGACYICON); } this.setWidth((int) bgWidth); diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/CPSDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/CPSDisplayMod.java index 0cb36bd..afcf4af 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/CPSDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/CPSDisplayMod.java @@ -11,7 +11,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public class CPSDisplayMod extends SimpleHUDMod { @@ -58,6 +58,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.MOUSE_POINTER : null; + return iconSetting.isToggled() ? LegacyIcon.MOUSE_POINTER : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/ClockMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/ClockMod.java index e198909..f5164e5 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/ClockMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/ClockMod.java @@ -20,7 +20,7 @@ import me.eldodebug.soar.management.mods.settings.impl.combo.Option; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public class ClockMod extends SimpleHUDMod { @@ -52,7 +52,7 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.CLOCK : null; + return iconSetting.isToggled() ? LegacyIcon.CLOCK : null; } private void drawNanoVG() { diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/ComboCounterMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/ComboCounterMod.java index 573da12..c7d9ac5 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/ComboCounterMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/ComboCounterMod.java @@ -8,7 +8,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public class ComboCounterMod extends SimpleHUDMod { @@ -60,6 +60,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.BAR_CHERT : null; + return iconSetting.isToggled() ? LegacyIcon.BAR_CHERT : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/CompassMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/CompassMod.java index dc66bf7..4b0f775 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/CompassMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/CompassMod.java @@ -18,7 +18,7 @@ import me.eldodebug.soar.management.mods.settings.impl.combo.Option; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.buffer.ScreenStencil; import net.minecraft.util.MathHelper; @@ -257,6 +257,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.COMPASS : null; + return iconSetting.isToggled() ? LegacyIcon.COMPASS : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/CoordsMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/CoordsMod.java index 1ecda04..bdf1e9c 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/CoordsMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/CoordsMod.java @@ -13,7 +13,7 @@ import me.eldodebug.soar.management.mods.settings.impl.combo.Option; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import net.minecraft.util.BlockPos; import net.minecraft.world.chunk.Chunk; @@ -70,6 +70,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.MAP_PIN : null; + return iconSetting.isToggled() ? LegacyIcon.MAP_PIN : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/DayCounterMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/DayCounterMod.java index be0e6a5..5591e65 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/DayCounterMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/DayCounterMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public class DayCounterMod extends SimpleHUDMod { @@ -30,6 +30,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.SUNRISE : null; + return iconSetting.isToggled() ? LegacyIcon.SUNRISE : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/FPSDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/FPSDisplayMod.java index 2918178..0b2571f 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/FPSDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/FPSDisplayMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import net.minecraft.client.Minecraft; public class FPSDisplayMod extends SimpleHUDMod { @@ -28,6 +28,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.MONITOR : null; + return iconSetting.isToggled() ? LegacyIcon.MONITOR : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/HealthDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/HealthDisplayMod.java index a43adae..52ef375 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/HealthDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/HealthDisplayMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public class HealthDisplayMod extends SimpleHUDMod { @@ -27,6 +27,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.HEART : null; + return iconSetting.isToggled() ? LegacyIcon.HEART : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/MemoryUsageMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/MemoryUsageMod.java index 8627d71..bd4002b 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/MemoryUsageMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/MemoryUsageMod.java @@ -13,7 +13,7 @@ import me.eldodebug.soar.management.mods.settings.impl.combo.Option; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.animation.simple.SimpleAnimation; public class MemoryUsageMod extends SimpleHUDMod { @@ -66,7 +66,7 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.SERVER : null; + return iconSetting.isToggled() ? LegacyIcon.SERVER : null; } private long getUsingMemory() { diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/NameDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/NameDisplayMod.java index 53a8832..384c734 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/NameDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/NameDisplayMod.java @@ -8,7 +8,7 @@ import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; import me.eldodebug.soar.management.mods.settings.impl.ComboSetting; import me.eldodebug.soar.management.mods.settings.impl.combo.Option; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public class NameDisplayMod extends SimpleHUDMod { @@ -40,6 +40,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.USER : null; + return iconSetting.isToggled() ? LegacyIcon.USER : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/PingDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/PingDisplayMod.java index 4f1e833..3410b27 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/PingDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/PingDisplayMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.ServerUtils; public class PingDisplayMod extends SimpleHUDMod { @@ -28,6 +28,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.BAR_CHERT : null; + return iconSetting.isToggled() ? LegacyIcon.BAR_CHERT : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/PlayTimeDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/PlayTimeDisplayMod.java index 5043e89..6d25c93 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/PlayTimeDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/PlayTimeDisplayMod.java @@ -6,7 +6,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public class PlayTimeDisplayMod extends SimpleHUDMod { @@ -34,6 +34,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.CLOCK : null; + return iconSetting.isToggled() ? LegacyIcon.CLOCK : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/PlayerCounterMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/PlayerCounterMod.java index 8fa3d24..170cb7e 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/PlayerCounterMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/PlayerCounterMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public class PlayerCounterMod extends SimpleHUDMod { @@ -27,6 +27,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.USERS : null; + return iconSetting.isToggled() ? LegacyIcon.USERS : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/PotionCounterMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/PotionCounterMod.java index 3f732f2..f85f04f 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/PotionCounterMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/PotionCounterMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.PlayerUtils; import net.minecraft.potion.Potion; @@ -32,6 +32,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.ARCHIVE : null; + return iconSetting.isToggled() ? LegacyIcon.ARCHIVE : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/ReachDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/ReachDisplayMod.java index c11d9b8..7c19937 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/ReachDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/ReachDisplayMod.java @@ -8,7 +8,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import net.minecraft.util.MovingObjectPosition; public class ReachDisplayMod extends SimpleHUDMod { @@ -53,6 +53,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.ACTIVITY : null; + return iconSetting.isToggled() ? LegacyIcon.ACTIVITY : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/ServerIPDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/ServerIPDisplayMod.java index 0239423..1dc9d09 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/ServerIPDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/ServerIPDisplayMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.ServerUtils; public class ServerIPDisplayMod extends SimpleHUDMod { @@ -28,6 +28,6 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.SERVER : null; + return iconSetting.isToggled() ? LegacyIcon.SERVER : null; } } diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/SessionInfoMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/SessionInfoMod.java index 1b5fc56..2870963 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/SessionInfoMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/SessionInfoMod.java @@ -11,7 +11,7 @@ import me.eldodebug.soar.management.mods.HUDMod; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.ServerUtils; import net.minecraft.network.play.server.S02PacketChat; import net.minecraft.util.StringUtils; @@ -53,13 +53,13 @@ private void drawNanoVG() { this.drawText("Session Info", 5.5F, 6F, 10.5F, Fonts.REGULAR); this.drawRect(0, 17.5F, 140, 1); - this.drawText(Icon.CLOCK, 5.5F, 22.5F, 10F, Fonts.ICON); + this.drawText(LegacyIcon.CLOCK, 5.5F, 22.5F, 10F, Fonts.LEGACYICON); this.drawText(time, 18, 24, 9, Fonts.REGULAR); - this.drawText(Icon.SERVER, 5.5F, 22.5F + 13, 10F, Fonts.ICON); + this.drawText(LegacyIcon.SERVER, 5.5F, 22.5F + 13, 10F, Fonts.LEGACYICON); this.drawText(ServerUtils.getServerIP(), 18, 24 + 12, 9, Fonts.REGULAR); - this.drawText(Icon.USER, 5.5F, 22.5F + 26, 10F, Fonts.ICON); + this.drawText(LegacyIcon.USER, 5.5F, 22.5F + 26, 10F, Fonts.LEGACYICON); this.drawText(killCount + " kill", 18, 24 + 26.5F, 9, Fonts.REGULAR); this.setWidth(140); diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/SpeedometerMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/SpeedometerMod.java index 0bd46b6..ce9bd8b 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/SpeedometerMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/SpeedometerMod.java @@ -12,7 +12,7 @@ import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.ColorUtils; import me.eldodebug.soar.utils.GlUtils; import me.eldodebug.soar.utils.PlayerUtils; @@ -90,7 +90,7 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.ACTIVITY : null; + return iconSetting.isToggled() ? LegacyIcon.ACTIVITY : null; } private void addSpeed(double speed) { diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/StopwatchMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/StopwatchMod.java index 3ad6acd..55cb634 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/StopwatchMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/StopwatchMod.java @@ -12,7 +12,7 @@ import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; import me.eldodebug.soar.management.mods.settings.impl.KeybindSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.TimerUtils; public class StopwatchMod extends SimpleHUDMod { @@ -66,7 +66,7 @@ public String getText() { @Override public String getIcon() { - return iconSetting.isToggled() ? Icon.WATCH : null; + return iconSetting.isToggled() ? LegacyIcon.WATCH : null; } @Override diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/TargetInfoMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/TargetInfoMod.java index 7fd97f5..cc837f9 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/TargetInfoMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/TargetInfoMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.HUDMod; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.TargetUtils; import me.eldodebug.soar.utils.animation.normal.Animation; import me.eldodebug.soar.utils.animation.normal.Direction; @@ -75,11 +75,11 @@ private void drawNanoVG() { this.drawPlayerHead(head, 5, 5, 36, 36, 6); this.drawText(name, 45.5F, 8F, 10.2F, Fonts.MEDIUM); - this.drawText(Icon.HEART_FILL, 52, 26.5F, 9, Fonts.ICON); + this.drawText(LegacyIcon.HEART_FILL, 52, 26.5F, 9, Fonts.LEGACYICON); this.drawArc(56.5F, 30.5F, 9F, -90F, -90F + 360, 1.6F, this.getFontColor(120)); this.drawArc(56.5F, 30.5F, 9F, -90F, -90F + (18 * healthAnimation.getValue()), 1.6F); - this.drawText(Icon.SHIELD_FILL, 76F, 26.5F, 9, Fonts.ICON); + this.drawText(LegacyIcon.SHIELD_FILL, 76F, 26.5F, 9, Fonts.LEGACYICON); this.drawArc(80.5F, 30.5F, 9F, -90F, -90F + 360, 1.6F, this.getFontColor(120)); this.drawArc(80.5F, 30.5F, 9F, -90F, -90F + (18 * armorAnimation.getValue()), 1.6F); diff --git a/src/main/java/me/eldodebug/soar/management/mods/impl/WeatherDisplayMod.java b/src/main/java/me/eldodebug/soar/management/mods/impl/WeatherDisplayMod.java index 3fd329d..a736253 100644 --- a/src/main/java/me/eldodebug/soar/management/mods/impl/WeatherDisplayMod.java +++ b/src/main/java/me/eldodebug/soar/management/mods/impl/WeatherDisplayMod.java @@ -5,7 +5,7 @@ import me.eldodebug.soar.management.language.TranslateText; import me.eldodebug.soar.management.mods.SimpleHUDMod; import me.eldodebug.soar.management.mods.settings.impl.BooleanSetting; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import net.minecraft.util.BlockPos; import net.minecraft.world.chunk.Chunk; @@ -52,18 +52,18 @@ public String getIcon() { Chunk chunk = mc.theWorld.getChunkFromBlockCoords(new BlockPos(mc.thePlayer)); biome = chunk.getBiome(new BlockPos(mc.thePlayer), this.mc.theWorld.getWorldChunkManager()).biomeName; - String iconFont = Icon.SUN; + String iconFont = LegacyIcon.SUN; if(mc.theWorld.isRaining()) { if(biome.contains("Extreme Hills") && mc.thePlayer.posY > 100) { - iconFont = Icon.CLOUD_SNOW; + iconFont = LegacyIcon.CLOUD_SNOW; }else { - iconFont = Icon.CLOUD_RAIN; + iconFont = LegacyIcon.CLOUD_RAIN; } } if(mc.theWorld.isThundering()) { - iconFont = Icon.CLOUD_LIGHTING; + iconFont = LegacyIcon.CLOUD_LIGHTING; } return iconSetting.isToggled() ? iconFont : null; diff --git a/src/main/java/me/eldodebug/soar/management/nanovg/font/FontManager.java b/src/main/java/me/eldodebug/soar/management/nanovg/font/FontManager.java index 5301a0a..53d9e9d 100644 --- a/src/main/java/me/eldodebug/soar/management/nanovg/font/FontManager.java +++ b/src/main/java/me/eldodebug/soar/management/nanovg/font/FontManager.java @@ -36,7 +36,7 @@ private void loadFont(long nvg, Font font) { throw new RuntimeException("Failed to init font " + font.getName()); }else { font.setLoaded(true); - if(Fonts.FALLBACK.isLoaded()) NanoVG.nvgAddFallbackFont(nvg, font.getName(), Fonts.FALLBACK.getName()); + if(Fonts.FALLBACK.isLoaded() && font != Fonts.FALLBACK) NanoVG.nvgAddFallbackFont(nvg, font.getName(), Fonts.FALLBACK.getName()); } } } diff --git a/src/main/java/me/eldodebug/soar/management/nanovg/font/Fonts.java b/src/main/java/me/eldodebug/soar/management/nanovg/font/Fonts.java index 6ae7f72..a64004d 100644 --- a/src/main/java/me/eldodebug/soar/management/nanovg/font/Fonts.java +++ b/src/main/java/me/eldodebug/soar/management/nanovg/font/Fonts.java @@ -13,9 +13,9 @@ public class Fonts { public static final Font REGULAR = new Font("regular", new ResourceLocation(PATH + "Inter-Regular.ttf")); public static final Font MEDIUM = new Font("medium", new ResourceLocation(PATH + "Inter-Medium.ttf")); public static final Font DEMIBOLD = new Font("demi-bold", new ResourceLocation(PATH + "Inter-SemiBold.ttf")); - public static final Font ICON = new Font("icon", new ResourceLocation(PATH + "Icon.ttf")); + public static final Font LEGACYICON = new Font("icon", new ResourceLocation(PATH + "Icon.ttf")); public static ArrayList getFonts() { - return new ArrayList(Arrays.asList(MEDIUM, DEMIBOLD, REGULAR, ICON)); + return new ArrayList(Arrays.asList(MEDIUM, DEMIBOLD, REGULAR, LEGACYICON)); } } diff --git a/src/main/java/me/eldodebug/soar/management/nanovg/font/Icon.java b/src/main/java/me/eldodebug/soar/management/nanovg/font/LegacyIcon.java similarity index 99% rename from src/main/java/me/eldodebug/soar/management/nanovg/font/Icon.java rename to src/main/java/me/eldodebug/soar/management/nanovg/font/LegacyIcon.java index 7e4a5af..8192f3a 100644 --- a/src/main/java/me/eldodebug/soar/management/nanovg/font/Icon.java +++ b/src/main/java/me/eldodebug/soar/management/nanovg/font/LegacyIcon.java @@ -1,7 +1,7 @@ package me.eldodebug.soar.management.nanovg.font; -public class Icon { +public class LegacyIcon { public static final String ACTIVITY = "@"; public static final String ALERT_TRIANGLE = "A"; diff --git a/src/main/java/me/eldodebug/soar/management/notification/Notification.java b/src/main/java/me/eldodebug/soar/management/notification/Notification.java index e0540c0..ce4c35e 100644 --- a/src/main/java/me/eldodebug/soar/management/notification/Notification.java +++ b/src/main/java/me/eldodebug/soar/management/notification/Notification.java @@ -69,7 +69,7 @@ private void drawNanoVG(NanoVGManager nvg) { nvg.drawShadow(x, y, maxWidth, 29, 6); nvg.drawGradientRoundedRect(x, y, maxWidth, 29, 6, ColorUtils.applyAlpha(currentColor.getColor1(), 220), ColorUtils.applyAlpha(currentColor.getColor2(), 220)); - nvg.drawText(type.getIcon(), x + 5, y + 6F, Color.WHITE, 17, Fonts.ICON); + nvg.drawText(type.getIcon(), x + 5, y + 6F, Color.WHITE, 17, Fonts.LEGACYICON); nvg.drawText(title.getText(), x + 26, y + 6F, Color.white, 9.6F, Fonts.MEDIUM); nvg.drawText(message.getText(), x + 26, y + 17.5F, Color.WHITE, 7.5F, Fonts.REGULAR); diff --git a/src/main/java/me/eldodebug/soar/management/notification/NotificationType.java b/src/main/java/me/eldodebug/soar/management/notification/NotificationType.java index fe46d29..f5a13ef 100644 --- a/src/main/java/me/eldodebug/soar/management/notification/NotificationType.java +++ b/src/main/java/me/eldodebug/soar/management/notification/NotificationType.java @@ -1,13 +1,13 @@ package me.eldodebug.soar.management.notification; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public enum NotificationType { - INFO(Icon.INFO), - WARNING(Icon.ALERT_TRIANGLE), - ERROR(Icon.X_CIRCLE), - SUCCESS(Icon.CHECK), - MUSIC(Icon.MUSIC); + INFO(LegacyIcon.INFO), + WARNING(LegacyIcon.ALERT_TRIANGLE), + ERROR(LegacyIcon.X_CIRCLE), + SUCCESS(LegacyIcon.CHECK), + MUSIC(LegacyIcon.MUSIC); private String icon; diff --git a/src/main/java/me/eldodebug/soar/management/remote/changelog/ChangelogType.java b/src/main/java/me/eldodebug/soar/management/remote/changelog/ChangelogType.java index c4415b0..b4900c0 100644 --- a/src/main/java/me/eldodebug/soar/management/remote/changelog/ChangelogType.java +++ b/src/main/java/me/eldodebug/soar/management/remote/changelog/ChangelogType.java @@ -2,14 +2,13 @@ import java.awt.Color; -import me.eldodebug.soar.management.language.TranslateText; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; public enum ChangelogType { - ADDED(0, Icon.PLUS, new Color(0, 142, 65)), - FIXED(1, Icon.REFRESH, new Color(207, 112, 3)), - REMOVED(2, Icon.MINUS, new Color(209, 34, 34)), - ERROR(999, Icon.PROHIBITED, new Color(143, 0, 0)); + ADDED(0, LegacyIcon.PLUS, new Color(0, 142, 65)), + FIXED(1, LegacyIcon.REFRESH, new Color(207, 112, 3)), + REMOVED(2, LegacyIcon.MINUS, new Color(209, 34, 34)), + ERROR(999, LegacyIcon.PROHIBITED, new Color(143, 0, 0)); private int id; private String string; diff --git a/src/main/java/me/eldodebug/soar/ui/comp/impl/CompImageSelect.java b/src/main/java/me/eldodebug/soar/ui/comp/impl/CompImageSelect.java index d05d89c..3623ebd 100644 --- a/src/main/java/me/eldodebug/soar/ui/comp/impl/CompImageSelect.java +++ b/src/main/java/me/eldodebug/soar/ui/comp/impl/CompImageSelect.java @@ -14,7 +14,7 @@ import me.eldodebug.soar.management.mods.settings.impl.ImageSetting; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.ui.comp.Comp; import me.eldodebug.soar.utils.Multithreading; import me.eldodebug.soar.utils.file.FileUtils; @@ -48,7 +48,7 @@ public void draw(int mouseX, int mouseY, float partialTicks) { nvg.drawGradientRoundedRect(this.getX(), this.getY(), 16, 16, 4, accentColor.getColor1(), accentColor.getColor2()); nvg.drawText(name, this.getX() - nameWidth - 5, this.getY() + 4, palette.getFontColor(ColorType.DARK), 9, Fonts.REGULAR); - nvg.drawCenteredText(Icon.FOLDER, this.getX() + 8, this.getY() + 2.5F, Color.WHITE, 10, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.FOLDER, this.getX() + 8, this.getY() + 2.5F, Color.WHITE, 10, Fonts.LEGACYICON); } @Override diff --git a/src/main/java/me/eldodebug/soar/ui/comp/impl/CompSoundSelect.java b/src/main/java/me/eldodebug/soar/ui/comp/impl/CompSoundSelect.java index b5f8f14..42b7860 100644 --- a/src/main/java/me/eldodebug/soar/ui/comp/impl/CompSoundSelect.java +++ b/src/main/java/me/eldodebug/soar/ui/comp/impl/CompSoundSelect.java @@ -14,7 +14,7 @@ import me.eldodebug.soar.management.mods.settings.impl.SoundSetting; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.ui.comp.Comp; import me.eldodebug.soar.utils.Multithreading; import me.eldodebug.soar.utils.file.FileUtils; @@ -48,7 +48,7 @@ public void draw(int mouseX, int mouseY, float partialTicks) { nvg.drawGradientRoundedRect(this.getX(), this.getY(), 16, 16, 4, accentColor.getColor1(), accentColor.getColor2()); nvg.drawText(name, this.getX() - nameWidth - 5, this.getY() + 4, palette.getFontColor(ColorType.DARK), 9, Fonts.REGULAR); - nvg.drawCenteredText(Icon.FOLDER, this.getX() + 8, this.getY() + 2.5F, Color.WHITE, 10, Fonts.ICON); + nvg.drawCenteredText(LegacyIcon.FOLDER, this.getX() + 8, this.getY() + 2.5F, Color.WHITE, 10, Fonts.LEGACYICON); } @Override diff --git a/src/main/java/me/eldodebug/soar/ui/comp/impl/field/CompMainMenuTextBox.java b/src/main/java/me/eldodebug/soar/ui/comp/impl/field/CompMainMenuTextBox.java index 2aba8e4..fbb02a1 100644 --- a/src/main/java/me/eldodebug/soar/ui/comp/impl/field/CompMainMenuTextBox.java +++ b/src/main/java/me/eldodebug/soar/ui/comp/impl/field/CompMainMenuTextBox.java @@ -71,7 +71,7 @@ public void draw(int mouseX, int mouseY, float partialTicks) { if(icon != null && title != null) { - nvg.drawText(icon, this.getX() + 5, this.getY() + (this.getHeight() / 2) - (nvg.getTextHeight(text, halfHeight, Fonts.REGULAR) / 2), fontColor, halfHeight, Fonts.ICON); + nvg.drawText(icon, this.getX() + 5, this.getY() + (this.getHeight() / 2) - (nvg.getTextHeight(text, halfHeight, Fonts.REGULAR) / 2), fontColor, halfHeight, Fonts.LEGACYICON); if(this.getText().isEmpty()) { nvg.save(); diff --git a/src/main/java/me/eldodebug/soar/ui/comp/impl/field/CompSearchBox.java b/src/main/java/me/eldodebug/soar/ui/comp/impl/field/CompSearchBox.java index feff459..c109973 100644 --- a/src/main/java/me/eldodebug/soar/ui/comp/impl/field/CompSearchBox.java +++ b/src/main/java/me/eldodebug/soar/ui/comp/impl/field/CompSearchBox.java @@ -8,7 +8,7 @@ import me.eldodebug.soar.management.color.palette.ColorType; import me.eldodebug.soar.management.nanovg.NanoVGManager; import me.eldodebug.soar.management.nanovg.font.Fonts; -import me.eldodebug.soar.management.nanovg.font.Icon; +import me.eldodebug.soar.management.nanovg.font.LegacyIcon; import me.eldodebug.soar.utils.TimerUtils; import me.eldodebug.soar.utils.animation.simple.SimpleAnimation; @@ -83,7 +83,7 @@ public void draw(int mouseX, int mouseY, float partialTicks) { searchAnimation.setAnimation(!focused && this.getText().isEmpty() ? 1.0F : 0.0F, 16); - nvg.drawText(Icon.SEARCH, this.getX() + 5, this.getY() + (this.getHeight() / 2) - (nvg.getTextHeight(text, halfHeight, Fonts.REGULAR) / 2), palette.getFontColor(ColorType.NORMAL), halfHeight, Fonts.ICON); + nvg.drawText(LegacyIcon.SEARCH, this.getX() + 5, this.getY() + (this.getHeight() / 2) - (nvg.getTextHeight(text, halfHeight, Fonts.REGULAR) / 2), palette.getFontColor(ColorType.NORMAL), halfHeight, Fonts.LEGACYICON); if(this.getText().isEmpty()) { nvg.save();