Fixed #11601
This commit is contained in:
@@ -26,6 +26,8 @@ public class SoundControl{
|
|||||||
/** music used explicitly after boss spawns */
|
/** music used explicitly after boss spawns */
|
||||||
public Seq<Music> bossMusic = Seq.with();
|
public Seq<Music> bossMusic = Seq.with();
|
||||||
|
|
||||||
|
public AudioBus uiBus = new AudioBus();
|
||||||
|
|
||||||
protected Music lastRandomPlayed;
|
protected Music lastRandomPlayed;
|
||||||
protected Interval timer = new Interval(4);
|
protected Interval timer = new Interval(4);
|
||||||
protected long lastPlayed;
|
protected long lastPlayed;
|
||||||
@@ -33,7 +35,6 @@ public class SoundControl{
|
|||||||
protected float fade;
|
protected float fade;
|
||||||
protected boolean silenced;
|
protected boolean silenced;
|
||||||
|
|
||||||
protected AudioBus uiBus = new AudioBus();
|
|
||||||
protected boolean wasPlaying;
|
protected boolean wasPlaying;
|
||||||
protected AudioFilter filter = new BiquadFilter(){{
|
protected AudioFilter filter = new BiquadFilter(){{
|
||||||
set(0, 500, 1);
|
set(0, 500, 1);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package mindustry.input;
|
package mindustry.input;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
|
import arc.audio.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
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
|
if((!config.isShown() && build.shouldShowConfigure(player)) //if the config fragment is hidden, show
|
||||||
//alternatively, the current selected block can 'agree' to switch config tiles
|
//alternatively, the current selected block can 'agree' to switch config tiles
|
||||||
|| (config.isShown() && config.getSelected().onConfigureBuildTapped(build) && build.shouldShowConfigure(player))){
|
|| (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.at(build);
|
||||||
|
build.block.configureSound.bus = oldBus;
|
||||||
config.showConfig(build);
|
config.showConfig(build);
|
||||||
}
|
}
|
||||||
//otherwise...
|
//otherwise...
|
||||||
|
|||||||
Reference in New Issue
Block a user