From b9da705564dfbb3348f65ae429b41211bffba7f1 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 4 Feb 2026 13:36:15 -0500 Subject: [PATCH] Fixed #11601 --- core/src/mindustry/audio/SoundControl.java | 3 ++- core/src/mindustry/input/InputHandler.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/audio/SoundControl.java b/core/src/mindustry/audio/SoundControl.java index b51348a23d..ad5675b2ef 100644 --- a/core/src/mindustry/audio/SoundControl.java +++ b/core/src/mindustry/audio/SoundControl.java @@ -26,6 +26,8 @@ public class SoundControl{ /** music used explicitly after boss spawns */ public Seq bossMusic = Seq.with(); + public AudioBus uiBus = new AudioBus(); + protected Music lastRandomPlayed; protected Interval timer = new Interval(4); protected long lastPlayed; @@ -33,7 +35,6 @@ public class SoundControl{ protected float fade; protected boolean silenced; - protected AudioBus uiBus = new AudioBus(); protected boolean wasPlaying; protected AudioFilter filter = new BiquadFilter(){{ set(0, 500, 1); diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 399c062d79..83ee32a9c9 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -1,6 +1,7 @@ package mindustry.input; import arc.*; +import arc.audio.*; import arc.func.*; import arc.graphics.*; import arc.graphics.g2d.*; @@ -1841,7 +1842,10 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ if((!config.isShown() && build.shouldShowConfigure(player)) //if the config fragment is hidden, show //alternatively, the current selected block can 'agree' to switch config tiles || (config.isShown() && config.getSelected().onConfigureBuildTapped(build) && build.shouldShowConfigure(player))){ + AudioBus oldBus = build.block.configureSound.bus; + build.block.configureSound.bus = control.sound.uiBus; build.block.configureSound.at(build); + build.block.configureSound.bus = oldBus; config.showConfig(build); } //otherwise...