Dim theme song volume when window is not focused.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-01-10 20:14:39 -05:00
parent b525ab4533
commit 1e59819f3a
2 changed files with 25 additions and 0 deletions

View File

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