From 1e8aea616b0aa4a93e4ebf349fb187eeb4e2accc Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 15 Aug 2010 01:07:05 +1200 Subject: [PATCH] Hook up music seek --- OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs b/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs index 54fa130e37..44d715bc10 100644 --- a/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs @@ -64,7 +64,8 @@ namespace OpenRA.Widgets.Delegates return bg.GetWidget("BUTTON_PLAY").OnMouseUp(mi); }; - bg.GetWidget("TIME").GetText = () => "{0:D2}:{1:D2} / {2:D2}:{3:D2}".F(0,0,Rules.Music[CurrentSong].Length / 60, Rules.Music[CurrentSong].Length % 60); + bg.GetWidget("TIME").GetText = () => "{0:D2}:{1:D2} / {2:D2}:{3:D2}".F((int)Sound.MusicSeekPosition / 60, (int)Sound.MusicSeekPosition % 60, + Rules.Music[CurrentSong].Length / 60, Rules.Music[CurrentSong].Length % 60); var ml = bg.GetWidget("MUSIC_LIST"); var itemTemplate = ml.GetWidget("MUSIC_TEMPLATE");