From a4917d92ab77bc980b68017721adac2091a51f3e Mon Sep 17 00:00:00 2001 From: Futuremappermydud <54294576+Futuremappermydud@users.noreply.github.com> Date: Fri, 7 Jul 2023 18:00:58 -0400 Subject: WIP Title Container movement + Duration methods Added a WIP configuration screen under /Skyblocker hud titleContainer that allows you to move, change alignment, and reorient the titles inside. Added methods(TitleContainer.addTitleWithDismiss, and RenderHelper.displayInTitleContainerWDismissAndPlaySound) that will display the given title and after a set amount of ticks will disable that title. --- .../skyblocker/config/SkyblockerConfig.java | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/main/java/me/xmrvizzy/skyblocker/config') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index d461dbfe..1aeee35e 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -255,6 +255,40 @@ public class SkyblockerConfig implements ConfigData { public static class TitleContainer { @ConfigEntry.BoundedDiscrete(min = 30, max = 140) public float titleContainerScale = 100; + public int x = 540; + public int y = 10; + @ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON) + public Direction direction = Direction.HORIZONTAL; + @ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.DROPDOWN) + public Alignment alignment = Alignment.MIDDLE; + } + + public enum Direction { + HORIZONTAL, + VERTICAL; + + @Override + public String toString() { + return switch (this) { + case HORIZONTAL -> "Horizontal"; + case VERTICAL -> "Vertical"; + }; + } + } + + public enum Alignment { + LEFT, + RIGHT, + MIDDLE; + + @Override + public String toString() { + return switch (this) { + case LEFT -> "Left"; + case RIGHT -> "Right"; + case MIDDLE -> "Middle"; + }; + } } public static class RichPresence { -- cgit