feat: add comments to settings file

This commit is contained in:
Martin Prokoph
2025-08-02 16:43:08 +02:00
parent 7fda6fdfe5
commit f7d0d21370
2 changed files with 21 additions and 1 deletions

View File

@@ -4,14 +4,22 @@ import eu.midnightdust.yaytris.util.Difficulty;
import eu.midnightdust.yaytris.util.Language;
import eu.midnightdust.yaytris.util.NightJson;
import java.util.Arrays;
public class Settings {
private static final NightJson json = new NightJson(Settings.class, "tetris_settings.json5");
public static NightJson.Comment c1 = new NightJson.Comment("Volume of theme music (0-100)");
public static int musicVolume = 100;
public static NightJson.Comment c2 = new NightJson.Comment("Volume of sound effects (0-100)");
public static int soundVolume = 100;
public static NightJson.Comment c3 = new NightJson.Comment("Amount the user interface should be scaled");
public static float guiScale = 3.f;
public static NightJson.Comment c4 = new NightJson.Comment("Whether speed should scale with level (true/false)");
public static boolean shouldScaleSpeed = true;
public static NightJson.Comment c5 = new NightJson.Comment("One of %s", Arrays.toString(Difficulty.values()));
public static Difficulty difficulty = Difficulty.NORMAL;
public static NightJson.Comment c6 = new NightJson.Comment("One of %s", Arrays.toString(Language.values()));
public static Language language = Language.ENGLISH;
public static void load() {