mirror of
https://github.com/SK-la/Ez2Lazer.git
synced 2026-03-13 11:20:28 +00:00
31 lines
705 B
C#
31 lines
705 B
C#
// VideoBackgroundScreen.cs
|
|
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Video;
|
|
using osu.Game.Graphics.Backgrounds;
|
|
|
|
namespace osu.Game.Screens.Backgrounds
|
|
{
|
|
public partial class VideoBackgroundScreen : Background
|
|
{
|
|
private readonly string videoPath;
|
|
|
|
public VideoBackgroundScreen(string videoPath)
|
|
{
|
|
this.videoPath = videoPath;
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
var video = new Video(videoPath)
|
|
{
|
|
RelativeSizeAxes = Axes.Both,
|
|
Loop = true
|
|
};
|
|
AddInternal(video);
|
|
}
|
|
}
|
|
}
|