Dim theme song volume when window is not focused.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -257,6 +257,14 @@ public class MusicController {
|
||||
return (trackExists() && player.setPosition(position / 1000f));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the music volume.
|
||||
* @param volume [0, 1]
|
||||
*/
|
||||
public static void setVolume(float volume) {
|
||||
SoundStore.get().setMusicVolume(volume);
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays the theme song.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user