Add support for gapless looping music.

This commit is contained in:
Matthias Mailänder
2021-08-22 20:59:13 +02:00
committed by abcdefg30
parent 9916e4c4ac
commit 9b1cec7712
6 changed files with 43 additions and 18 deletions

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var repeatCheckbox = panel.Get<CheckboxWidget>("REPEAT");
repeatCheckbox.IsChecked = () => Game.Settings.Sound.Repeat;
repeatCheckbox.OnClick = () => Game.Settings.Sound.Repeat ^= true;
repeatCheckbox.OnClick = () => Game.Sound.SetMusicLooped(!Game.Settings.Sound.Repeat);
repeatCheckbox.IsDisabled = () => musicPlaylist.CurrentSongIsBackground;
panel.Get<LabelWidget>("TIME_LABEL").GetText = () =>