Config theme and animation config

This commit is contained in:
2026-03-05 23:34:42 +01:00
parent cd8a41524f
commit 4bb6cf8489
5 changed files with 76 additions and 14 deletions
@@ -1,9 +1,13 @@
package org.saturnclient.common.minecraft;
import java.io.File;
public abstract class MinecraftProvider {
public static MinecraftProvider PROVIDER;
public abstract Object createIdentifier(String namespace, String path);
public abstract boolean isKeyPressed(int key);
public abstract File getRunDirectory();
}
@@ -1,7 +1,7 @@
package org.saturnclient.config;
import org.saturnclient.saturnclient.config.manager.ConfigManager;
import org.saturnclient.saturnclient.config.manager.Property;
import org.saturnclient.config.manager.ConfigManager;
import org.saturnclient.config.manager.Property;
public class AnimationConfig {
public static ConfigManager config;
@@ -1,11 +1,12 @@
package org.saturnclient.saturnclient.config;
package org.saturnclient.config;
import org.lwjgl.glfw.GLFW;
import org.saturnclient.saturnclient.config.manager.ConfigManager;
import org.saturnclient.saturnclient.config.manager.Property;
import org.saturnclient.ui.resources.Textures;
import java.io.File;
import net.minecraft.util.Identifier;
import org.saturnclient.common.minecraft.MinecraftProvider;
import org.saturnclient.common.minecraft.SaturnIdentifier;
import org.saturnclient.config.manager.ConfigManager;
import org.saturnclient.config.manager.Key;
import org.saturnclient.config.manager.Property;
public class Config {
public static ConfigManager config;
@@ -13,15 +14,17 @@ public class Config {
public static Property<Boolean> realisticLogo = Property.bool(false);
public static Property<Boolean> saturnTitleScreen = Property.bool(true);
public static Property<Boolean> cloakPhysics = Property.bool(true);
public static Property<Integer> openEmoteWheel = Property.keybinding(GLFW.GLFW_KEY_B);
public static Property<Integer> openEmoteWheel = Property.keybinding(Key.GLFW_KEY_B);
public static Property<Boolean> stagger = Property.bool(true);
public static Identifier getLogo() {
public static SaturnIdentifier getLogo() {
return realisticLogo.value ? Textures.REALISTIC_LOGO : Textures.LOGO;
}
public static void init() {
config = new ConfigManager("Saturn Client");
File configFile = new File(MinecraftProvider.PROVIDER.getRunDirectory(), "saturn.json");
config = new ConfigManager(configFile, "Saturn Client");
config.property("Realistic logo", realisticLogo);
config.property("Saturn client title screen", saturnTitleScreen);
config.property("Open Emote Wheel", openEmoteWheel);
@@ -1,7 +1,7 @@
package org.saturnclient.saturnclient.config;
package org.saturnclient.config;
import org.saturnclient.saturnclient.config.manager.ConfigManager;
import org.saturnclient.saturnclient.config.manager.Property;
import org.saturnclient.config.manager.ConfigManager;
import org.saturnclient.config.manager.Property;
public class Theme {
// Main UI background (slightly warm dark to match Saturn tone)
@@ -0,0 +1,55 @@
package org.saturnclient.config.manager;
public class Key {
/** Printable keys. */
public static final int GLFW_KEY_SPACE = 32,
GLFW_KEY_APOSTROPHE = 39,
GLFW_KEY_COMMA = 44,
GLFW_KEY_MINUS = 45,
GLFW_KEY_PERIOD = 46,
GLFW_KEY_SLASH = 47,
GLFW_KEY_0 = 48,
GLFW_KEY_1 = 49,
GLFW_KEY_2 = 50,
GLFW_KEY_3 = 51,
GLFW_KEY_4 = 52,
GLFW_KEY_5 = 53,
GLFW_KEY_6 = 54,
GLFW_KEY_7 = 55,
GLFW_KEY_8 = 56,
GLFW_KEY_9 = 57,
GLFW_KEY_SEMICOLON = 59,
GLFW_KEY_EQUAL = 61,
GLFW_KEY_A = 65,
GLFW_KEY_B = 66,
GLFW_KEY_C = 67,
GLFW_KEY_D = 68,
GLFW_KEY_E = 69,
GLFW_KEY_F = 70,
GLFW_KEY_G = 71,
GLFW_KEY_H = 72,
GLFW_KEY_I = 73,
GLFW_KEY_J = 74,
GLFW_KEY_K = 75,
GLFW_KEY_L = 76,
GLFW_KEY_M = 77,
GLFW_KEY_N = 78,
GLFW_KEY_O = 79,
GLFW_KEY_P = 80,
GLFW_KEY_Q = 81,
GLFW_KEY_R = 82,
GLFW_KEY_S = 83,
GLFW_KEY_T = 84,
GLFW_KEY_U = 85,
GLFW_KEY_V = 86,
GLFW_KEY_W = 87,
GLFW_KEY_X = 88,
GLFW_KEY_Y = 89,
GLFW_KEY_Z = 90,
GLFW_KEY_LEFT_BRACKET = 91,
GLFW_KEY_BACKSLASH = 92,
GLFW_KEY_RIGHT_BRACKET = 93,
GLFW_KEY_GRAVE_ACCENT = 96,
GLFW_KEY_WORLD_1 = 161,
GLFW_KEY_WORLD_2 = 162;
}