CustomSplashScreen 2.0.0 - Rewrite

- Rewrite basically the entire mod for more stability and compatibility
- Now uses MidnightLib for configuration
- Added spinning loading indicator
- Support for random background images located in /config/customsplashscreen/backgrounds
- Boss Bar loading bar is now fixed and can be changed in color
- Splash screen can now be previewed!

All previous configs need to be rewritten, but all options are still available.
This commit is contained in:
Motschen
2023-05-26 21:56:20 +02:00
parent 2137a1dbe4
commit 7b236188f6
15 changed files with 426 additions and 411 deletions

View File

@@ -1,59 +1,63 @@
package eu.midnightdust.customsplashscreen.config;
import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
import me.shedaniel.autoconfig.annotation.ConfigEntry;
import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.Comment;
import eu.midnightdust.lib.config.MidnightConfig;
@Config(name = "customsplashscreen")
public class CustomSplashScreenConfig implements ConfigData {
public class CustomSplashScreenConfig extends MidnightConfig {
public static final String general = "general";
public static final String loading = "loading_indicator";
public static final String colors = "colors";
@Comment(value = "Change the design of the progress bar")
@ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
public ProgressBarType progressBarType = ProgressBarType.Vanilla;
//"Change the design of the progress bar")
@Entry(category = loading)
public static ProgressBarType progressBarType = ProgressBarType.Vanilla;
@Comment(value = "Change the texture of the logo")
@ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
public LogoStyle logoStyle = LogoStyle.Mojang;
//"Change the texture of the logo")
@Entry(category = general)
public static LogoStyle logoStyle = LogoStyle.Mojang;
@Comment(value = "Enable/Disable the background image")
public boolean backgroundImage = false;
//"Enable/Disable the background image")
@Entry(category = general)
public static boolean backgroundImage = false;
@Comment(value = "Change the color of the background")
@ConfigEntry.ColorPicker
public int backgroundColor = 15675965;
@Comment(value = "Change the color of the progress bar")
@ConfigEntry.ColorPicker
public int progressBarColor = 16777215;
@Comment(value = "Change the color of the progress bar frame")
@ConfigEntry.ColorPicker
public int progressFrameColor = 16777215;
//"Enable/Disable logo blend")
@Entry(category = general)
public static boolean logoBlend = true;
@Comment(value = "Change the mode of the custom loading bar")
@ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
public ProgressBarMode customProgressBarMode = ProgressBarMode.Linear;
//"Change the color of the background")
@Entry(category = colors, isColor = true)
public static String backgroundColor = "#EF323D";
//"Change the color of the progress bar")
@Entry(category = colors, isColor = true)
public static String progressBarColor = "#FFFFFF";
//"Change the color of the progress bar frame")
@Entry(category = colors, isColor = true)
public static String progressFrameColor = "#FFFFFF";
@Entry(category = colors, isColor = true)
public static String progressBackgroundColor = "#000000";
@Comment(value = "Enable/Disable the custom progress bar background")
public boolean customProgressBarBackground = false;
//"Enable/Disable the progress bar background")
@Entry(category = loading)
public static boolean progressBarBackground = false;
@Comment(value = "Change the style of the boss loading bar")
@ConfigEntry.Gui.EnumHandler(option = ConfigEntry.Gui.EnumHandler.EnumDisplayOption.BUTTON)
public BossBarType bossBarType = BossBarType.NOTCHED_6;
//"Change the mode of the custom loading bar")
@Entry(category = loading)
public static ProgressBarMode customProgressBarMode = ProgressBarMode.Linear;
@ConfigEntry.Gui.CollapsibleObject
public Textures textures = new Textures();
public static class Textures {
public String BackgroundTexture = "background.png";
public String MojangLogo = "mojangstudios.png";
public String Aspect1to1Logo = "mojank.png";
public String BossBarTexture = "textures/gui/bars.png";
public String CustomBarTexture = "progressbar.png";
public String CustomBarBackgroundTexture = "progressbar_background.png";
}
//"Change the color of the boss loading bar")
@Entry(category = loading)
public static BossBarColor bossBarColor = BossBarColor.MAGENTA;
//"Change the style of the boss loading bar")
@Entry(category = loading)
public static BossBarType bossBarType = BossBarType.NOTCHED_6;
@Entry(category = loading, isSlider = true, min = 1, max = 10)
public static int spinningCircleSize = 2;
@Entry(category = loading, isSlider = true, min = 1, max = 10)
public static int spinningCircleSpeed = 4;
@Entry(category = loading, isSlider = true, min = 0, max = 23)
public static int spinningCircleTrail = 5;
public enum ProgressBarType {
Vanilla, BossBar, Custom, Hidden;
Vanilla, BossBar, Custom, SpinningCircle, Hidden;
}
public enum LogoStyle {
Mojang, Aspect1to1, Hidden;
@@ -61,6 +65,9 @@ public class CustomSplashScreenConfig implements ConfigData {
public enum ProgressBarMode {
Linear, Stretch;
}
public enum BossBarColor {
MAGENTA, CYAN, RED, LIME, YELLOW, PURPLE, WHITE;
}
public enum BossBarType {
PROGRESS, NOTCHED_6, NOTCHED_10, NOTCHED_12, NOTCHED_20;
}