feat: improve config screen with comments

This commit is contained in:
Martin Prokoph
2025-03-29 19:30:38 +01:00
parent c9c630ac11
commit 552f1e619e
3 changed files with 37 additions and 14 deletions

View File

@@ -15,6 +15,8 @@ public class BlurConfig extends MidnightConfig {
public static final String SCREENS = "screens";
@Entry @Hidden public static int configVersion = 2;
@Comment(category = SCREENS, centered = true)
public static Comment _general;
@Entry(category = SCREENS)
public static boolean blurContainers = true;
@Entry(category = SCREENS)
@@ -22,14 +24,21 @@ public class BlurConfig extends MidnightConfig {
@Condition(requiredOption = "blurTitleScreen", visibleButLocked = true)
@Entry(category = SCREENS)
public static boolean darkenTitleScreen = false;
@Entry(category = ANIMATIONS, min = 0, max = 2000, isSlider = true)
public static int fadeTimeMillis = 300;
@Entry(category = ANIMATIONS, min = 0, max = 2000, isSlider = true)
public static int fadeOutTimeMillis = 300;
@Entry(category = ANIMATIONS)
public static BlurConfig.Easing animationCurve = Easing.FLAT;
@Comment(category = SCREENS, centered = true)
public static Comment _advanced;
@Entry(category = SCREENS) // Screens where Blur+ should not apply transition effects (mostly dynamically blurred screens)
public static List<String> excludedScreens = Lists.newArrayList("net.irisshaders.iris.gui.screen.ShaderPackScreen");
@Entry(category = SCREENS) // Screens where the vanilla blur effect should be force enabled
public static List<String> forceEnabledScreens = Lists.newArrayList("dev.emi.emi.screen.RecipeScreen");
@Entry(category = SCREENS) // Screens where the vanilla blur effect should be force disabled
public static List<String> forceDisabledScreens = Lists.newArrayList();
@Comment(category = STYLE, centered = true)
public static Comment _blur;
@Entry(category = STYLE, isSlider = true, min = 0, max = 20)
public static int radius = 5;
@Comment(category = STYLE, centered = true)
public static Comment _gradient;
@Entry(category = STYLE)
public static boolean useGradient = true;
@Condition(requiredOption = "useGradient", visibleButLocked = true)
@@ -49,12 +58,15 @@ public class BlurConfig extends MidnightConfig {
public static int gradientRotation = 0;
@Entry(category = STYLE)
public static boolean rainbowMode = false;
@Entry(category = SCREENS) // Screens where Blur+ should not apply transition effects (mostly dynamically blurred screens)
public static List<String> excludedScreens = Lists.newArrayList("net.irisshaders.iris.gui.screen.ShaderPackScreen");
@Entry(category = SCREENS) // Screens where the vanilla blur effect should be force enabled
public static List<String> forceEnabledScreens = Lists.newArrayList("dev.emi.emi.screen.RecipeScreen");
@Entry(category = SCREENS) // Screens where the vanilla blur effect should be force disabled
public static List<String> forceDisabledScreens = Lists.newArrayList();
@Comment(category = ANIMATIONS, centered = true)
public static Comment _animations;
@Entry(category = ANIMATIONS, min = 0, max = 2000, isSlider = true)
public static int fadeTimeMillis = 300;
@Entry(category = ANIMATIONS, min = 0, max = 2000, isSlider = true)
public static int fadeOutTimeMillis = 300;
@Entry(category = ANIMATIONS)
public static BlurConfig.Easing animationCurve = Easing.FLAT;
@Override
public void writeChanges(String modid) {

View File

@@ -1,6 +1,7 @@
{
"blur.midnightconfig.title": "Blur+ Konfiguration",
"blur.midnightconfig.category.animations": "Animationen",
"blur.midnightconfig.category.screens": "Bildschirme",
"blur.midnightconfig.category.style": "Stil",
"blur.midnightconfig.blurContainers": "Unschärfe in Containern",
"blur.midnightconfig.blurTitleScreen": "Unschärfe im Titelbildschirm",
@@ -26,5 +27,10 @@
"blur.midnightconfig.gradientStartAlpha": "Farbverlauf-Anfangstransparenz",
"blur.midnightconfig.gradientEndAlpha": "Farbverlauf-Endstransparenz",
"blur.midnightconfig.gradientRotation": "Farbverlauf-Rotation",
"blur.midnightconfig.excludedScreens": "Ausgeschlossene Bildschirme"
"blur.midnightconfig.excludedScreens": "Ausgeschlossene Bildschirme",
"blur.midnightconfig._general": "§7⛏ Generell",
"blur.midnightconfig._advanced": "§7⚒ Fortgeschritten",
"blur.midnightconfig._blur": "§7▒ Unschärfe",
"blur.midnightconfig._gradient": "§7\uD83D\uDFE2 Farbverlauf",
"blur.midnightconfig._animations": "§7\uD83D\uDCFD Animationen"
}

View File

@@ -33,5 +33,10 @@
"blur.midnightconfig.forceEnabledScreens": "Force-enabled Screens",
"blur.midnightconfig.forceEnabledScreens.tooltip": "Screens where the vanilla blur effect should be force-enabled\nMight not work 100% of the time",
"blur.midnightconfig.forceDisabledScreens": "Force-disabled Screens",
"blur.midnightconfig.forceDisabledScreens.tooltip": "Screens where the vanilla blur effect should be force-disabled"
"blur.midnightconfig.forceDisabledScreens.tooltip": "Screens where the vanilla blur effect should be force-disabled",
"blur.midnightconfig._general": "§7⛏ General",
"blur.midnightconfig._advanced": "§7⚒ Advanced",
"blur.midnightconfig._blur": "§7▒ Blur",
"blur.midnightconfig._gradient": "§7\uD83D\uDFE2 Gradient",
"blur.midnightconfig._animations": "§7\uD83D\uDCFD Animations"
}