2021-05-25 15:17:28 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2021-05-25 15:17:28 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Game.Storyboards.Drawables;
|
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Storyboards
|
|
|
|
{
|
2021-05-25 17:50:33 +08:00
|
|
|
public partial class StoryboardVideoLayer : StoryboardLayer
|
2021-05-25 15:17:28 +08:00
|
|
|
{
|
2021-05-25 17:50:33 +08:00
|
|
|
public StoryboardVideoLayer(string name, int depth, bool masking)
|
2021-05-25 15:17:28 +08:00
|
|
|
: base(name, depth, masking)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public override DrawableStoryboardLayer CreateDrawable()
|
2021-05-25 17:50:33 +08:00
|
|
|
=> new DrawableStoryboardVideoLayer(this) { Depth = Depth, Name = Name };
|
2021-05-25 15:17:28 +08:00
|
|
|
|
2021-05-25 17:50:33 +08:00
|
|
|
public partial class DrawableStoryboardVideoLayer : DrawableStoryboardLayer
|
2021-05-25 15:17:28 +08:00
|
|
|
{
|
2021-05-25 17:50:33 +08:00
|
|
|
public DrawableStoryboardVideoLayer(StoryboardVideoLayer layer)
|
2021-05-25 15:17:28 +08:00
|
|
|
: base(layer)
|
|
|
|
{
|
|
|
|
// for videos we want to take on the full size of the storyboard container hierarchy
|
|
|
|
// to allow the video to fill the full available region.
|
|
|
|
ElementContainer.RelativeSizeAxes = Axes.Both;
|
|
|
|
ElementContainer.Size = Vector2.One;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|