Begin making video player widget useful; steal (othewise useless) musicplayer controls for now

This commit is contained in:
Paul Chote
2010-08-12 00:31:30 +12:00
parent 93a48c0cf1
commit c600239c54
4 changed files with 53 additions and 123 deletions

View File

@@ -19,15 +19,20 @@ namespace OpenRA.Widgets.Delegates
bg.GetWidget("BUTTON_PLAY").OnMouseUp = mi =>
{
var foo = Widget.RootWidget.GetWidget<VqaPlayerWidget>("VIDEOPLAYER");
foo.Load("ally10.vqa");
foo.Play();
/*
if (Sound.MusicStopped)
Sound.PlayMusic(GetSong());
Sound.MusicStopped = false;
Sound.MusicPaused = false;
bg.GetWidget("BUTTON_PLAY").Visible = false;
bg.GetWidget("BUTTON_PAUSE").Visible = true;
*/
return true;
};
/*
bg.GetWidget("BUTTON_PAUSE").OnMouseUp = mi =>
{
Sound.MusicPaused = true;
@@ -35,15 +40,19 @@ namespace OpenRA.Widgets.Delegates
bg.GetWidget("BUTTON_PLAY").Visible = true;
return true;
};
*/
bg.GetWidget("BUTTON_STOP").OnMouseUp = mi =>
{
var foo = Widget.RootWidget.GetWidget<VqaPlayerWidget>("VIDEOPLAYER");
foo.Stop();
/*
Sound.MusicStopped = true;
bg.GetWidget("BUTTON_PAUSE").Visible = false;
bg.GetWidget("BUTTON_PLAY").Visible = true;
*/
return true;
};
/*
bg.GetWidget("BUTTON_NEXT").OnMouseUp = mi =>
{
Sound.PlayMusic(GetNextSong());
@@ -63,6 +72,7 @@ namespace OpenRA.Widgets.Delegates
bg.GetWidget("BUTTON_PAUSE").Visible = true;
return true;
};
*/
}
string GetNextSong()