fix noob mistake, still goes boom

This commit is contained in:
alzeih
2010-05-05 23:40:33 +12:00
parent 30ee0afdc0
commit 930ad6e9a1
2 changed files with 11 additions and 0 deletions

View File

@@ -43,17 +43,25 @@ namespace OpenRA.Widgets.Delegates
return true; return true;
}; };
bg.GetWidget("BUTTON_NEXT").OnMouseUp = mi => { bg.GetWidget("BUTTON_NEXT").OnMouseUp = mi => {
Sound.PlayMusic(GetNextSong());
Sound.MusicPaused = false; Sound.MusicPaused = false;
bg.GetWidget("BUTTON_PLAY").Visible = false; bg.GetWidget("BUTTON_PLAY").Visible = false;
bg.GetWidget("BUTTON_PAUSE").Visible = true; bg.GetWidget("BUTTON_PAUSE").Visible = true;
return true; return true;
}; };
bg.GetWidget("BUTTON_PREV").OnMouseUp = mi => { bg.GetWidget("BUTTON_PREV").OnMouseUp = mi => {
Sound.PlayMusic(GetNextSong());
Sound.MusicPaused = false; Sound.MusicPaused = false;
bg.GetWidget("BUTTON_PLAY").Visible = false; bg.GetWidget("BUTTON_PLAY").Visible = false;
bg.GetWidget("BUTTON_PAUSE").Visible = true; bg.GetWidget("BUTTON_PAUSE").Visible = true;
return true; return true;
}; };
} }
string GetNextSong()
{
//goes boom here
return Rules.Music["AllMusic"].Pools.Value["Music"].GetNext();
}
} }
} }

View File

@@ -49,5 +49,8 @@ Voices:
Terrain: Terrain:
mods/ra/terrain.yaml mods/ra/terrain.yaml
Music:
mods/ra/music.yaml
ShellmapUid:b22b0197b126d6236a7c1e18c3001c83af10156c ShellmapUid:b22b0197b126d6236a7c1e18c3001c83af10156c