This commit is contained in:
Anuken
2026-02-04 13:36:15 -05:00
parent 764c38c71e
commit b9da705564
2 changed files with 6 additions and 1 deletions

View File

@@ -26,6 +26,8 @@ public class SoundControl{
/** music used explicitly after boss spawns */
public Seq<Music> 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);

View File

@@ -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...