Files
Ez2Lazer/osu.Game/Screens/Backgrounds/VideoBackgroundScreen.cs
2025-04-06 22:32:42 +08:00

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);
}
}
}