Video pausing support; sync video to audio nicer.

This commit is contained in:
Paul Chote
2010-08-14 17:21:54 +12:00
parent 5c8c8d5e6e
commit a569c712f0
5 changed files with 89 additions and 46 deletions

View File

@@ -21,12 +21,21 @@ namespace OpenRA.Widgets.Delegates
{
var bg = Widget.RootWidget.GetWidget("VIDEOPLAYER_MENU");
var player = bg.GetWidget<VqaPlayerWidget>("VIDEOPLAYER");
bg.GetWidget("BUTTON_PLAY").OnMouseUp = mi =>
var pp = bg.GetWidget("BUTTON_PLAYPAUSE");
pp.OnMouseUp = mi =>
{
player.Play();
if (player.Paused)
player.Play();
else
player.Pause();
return true;
};
pp.GetWidget("PLAY").IsVisible = () => player.Paused;
pp.GetWidget("PAUSE").IsVisible = () => !player.Paused;
bg.GetWidget("BUTTON_STOP").OnMouseUp = mi =>
{
player.Stop();