From 930ad6e9a17eec337353354d677654f9aa065bb2 Mon Sep 17 00:00:00 2001 From: alzeih Date: Wed, 5 May 2010 23:40:33 +1200 Subject: [PATCH] fix noob mistake, still goes boom --- OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs | 8 ++++++++ mods/ra/mod.yaml | 3 +++ 2 files changed, 11 insertions(+) diff --git a/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs b/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs index 606d404e92..7403492f3e 100644 --- a/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/MusicPlayerDelegate.cs @@ -43,17 +43,25 @@ namespace OpenRA.Widgets.Delegates return true; }; bg.GetWidget("BUTTON_NEXT").OnMouseUp = mi => { + Sound.PlayMusic(GetNextSong()); Sound.MusicPaused = false; bg.GetWidget("BUTTON_PLAY").Visible = false; bg.GetWidget("BUTTON_PAUSE").Visible = true; return true; }; bg.GetWidget("BUTTON_PREV").OnMouseUp = mi => { + Sound.PlayMusic(GetNextSong()); Sound.MusicPaused = false; bg.GetWidget("BUTTON_PLAY").Visible = false; bg.GetWidget("BUTTON_PAUSE").Visible = true; return true; }; } + + string GetNextSong() + { + //goes boom here + return Rules.Music["AllMusic"].Pools.Value["Music"].GetNext(); + } } } diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 40fd024af3..18b3a3bb16 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -49,5 +49,8 @@ Voices: Terrain: mods/ra/terrain.yaml + +Music: + mods/ra/music.yaml ShellmapUid:b22b0197b126d6236a7c1e18c3001c83af10156c