Skip to content

Commit

Permalink
Menu background override setting
Browse files Browse the repository at this point in the history
  • Loading branch information
MEEPofFaith committed Mar 2, 2024
1 parent 40d9687 commit 219e624
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/drunkustry/graphics/DrunkRendering.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down
1 change: 1 addition & 0 deletions src/drunkustry/ui/DrunkSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 219e624

Please sign in to comment.