Implemented Floating Text and radar video

This commit is contained in:
DeadlySurprise
2014-12-14 14:39:41 +01:00
parent 5bcd56eb9d
commit 7b53582c5e
9 changed files with 209 additions and 40 deletions

View File

@@ -10,6 +10,7 @@
using System;
using System.IO;
using OpenRA.FileFormats;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Scripting
@@ -56,5 +57,28 @@ namespace OpenRA.Mods.Common.Scripting
onComplete();
});
}
public static void PlayFMVInRadar(World w, VqaReader movie, Action onComplete)
{
var player = Ui.Root.Get<VqaPlayerWidget>("PLAYER");
player.Open(movie);
player.PlayThen(() =>
{
onComplete();
player.CloseVideo();
});
}
public static void StopFMVInRadar()
{
var player = Ui.Root.Get<VqaPlayerWidget>("PLAYER");
player.Stop();
}
public static VqaReader LoadVqa(Stream s)
{
return new VqaReader(s);
}
}
}