From 219e624ef276dd15464ade04b1cdf1e63d64d187 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Fri, 1 Mar 2024 18:20:44 -0800 Subject: [PATCH] Menu background override setting --- assets/bundles/bundle.properties | 3 +++ src/drunkustry/graphics/DrunkRendering.java | 5 ++++- src/drunkustry/ui/DrunkSettings.java | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/assets/bundles/bundle.properties b/assets/bundles/bundle.properties index cc9a496..0b1d5b4 100644 --- a/assets/bundles/bundle.properties +++ b/assets/bundles/bundle.properties @@ -6,6 +6,9 @@ setting.du-drunk-scl.name = Fluctuation Speed setting.du-drunk-mag.name = Fluctuation Amount setting.du-flanger.name = Sound Flangering setting.du-flanger.description = Restart required to apply changes + +setting.du-menu-background.name = Apply to Menu Background +setting.du-menu-background.description = Disable if conflicting with other mods\nRestart required to apply changes setting.du-aberration.name = Chromatic Abberation setting.du-aberration.description = Restart required to apply changes setting.du-aberration-speed.name = Abberation Speed diff --git a/src/drunkustry/graphics/DrunkRendering.java b/src/drunkustry/graphics/DrunkRendering.java index b875f57..4a889fc 100644 --- a/src/drunkustry/graphics/DrunkRendering.java +++ b/src/drunkustry/graphics/DrunkRendering.java @@ -23,7 +23,10 @@ public static void init(){ initDistortion(); initInversion(); - Reflect.set(ui.menufrag, "renderer", new DrunkMenuRenderer()); + if(settings.getBool("du-menu-background", true)){ + Log.debug("Drunkifying menu renderer..."); + Reflect.set(ui.menufrag, "renderer", new DrunkMenuRenderer()); + } } private static void initAberration(){ diff --git a/src/drunkustry/ui/DrunkSettings.java b/src/drunkustry/ui/DrunkSettings.java index 041e625..307cae5 100644 --- a/src/drunkustry/ui/DrunkSettings.java +++ b/src/drunkustry/ui/DrunkSettings.java @@ -25,6 +25,7 @@ public static void init(){ t.pref(new FloatSliderSetting("du-drunk-mag", 1f, 0.1f, 2f, 0.01f, percent)); t.checkPref("du-flanger", true); t.pref(new Separator("@settings.graphics")); + t.checkPref("du-menu-background", true); t.checkPref("du-aberration", true); t.pref(new FloatSliderSetting("du-aberration-speed", 1f, 0f, 5f, 0.01f, mult)); t.pref(new FloatSliderSetting("du-aberration-amount", 1f, 0f, 5f, 0.01f, percent));