Make the sound engine less dumb about music. Fix the music player not knowing about already playing tracks.

This commit is contained in:
Paul Chote
2011-05-18 18:58:33 +12:00
parent 42d8722cbc
commit c76d2e37dc
5 changed files with 32 additions and 30 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
if (CurrentSong == null)
return true;
Sound.PlayMusicThen(Rules.Music[CurrentSong].Filename,
Sound.PlayMusicThen(Rules.Music[CurrentSong],
() => bg.GetWidget(Game.Settings.Sound.Repeat ? "BUTTON_PLAY" : "BUTTON_NEXT").OnMouseUp(new MouseInput()));
bg.GetWidget("BUTTON_PLAY").Visible = false;
bg.GetWidget("BUTTON_PAUSE").Visible = true;