Implemented Floating Text and radar video
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user