mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 14:47:18 +08:00
Expose some storyboard pieces to allow better testability
This commit is contained in:
parent
43ae26b8ef
commit
773ec46989
@ -23,7 +23,9 @@ namespace osu.Game.Storyboards.Drawables
|
||||
{
|
||||
public partial class DrawableStoryboard : Container<DrawableStoryboardLayer>
|
||||
{
|
||||
[Cached]
|
||||
public Vector2 AppliedScale { get; private set; }
|
||||
|
||||
[Cached(typeof(Storyboard))]
|
||||
public Storyboard Storyboard { get; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,6 +1,7 @@
|
||||
// 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.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
@ -30,10 +31,12 @@ namespace osu.Game.Storyboards.Drawables
|
||||
InternalChild = ElementContainer = new LayerElementContainer(layer);
|
||||
}
|
||||
|
||||
protected partial class LayerElementContainer : LifetimeManagementContainer
|
||||
public partial class LayerElementContainer : LifetimeManagementContainer
|
||||
{
|
||||
private readonly StoryboardLayer storyboardLayer;
|
||||
|
||||
public IEnumerable<Drawable> Elements => InternalChildren;
|
||||
|
||||
public LayerElementContainer(StoryboardLayer layer)
|
||||
{
|
||||
storyboardLayer = layer;
|
||||
|
@ -86,7 +86,7 @@ namespace osu.Game.Storyboards
|
||||
}
|
||||
}
|
||||
|
||||
public DrawableStoryboard CreateDrawable(IReadOnlyList<Mod>? mods = null) =>
|
||||
public virtual DrawableStoryboard CreateDrawable(IReadOnlyList<Mod>? mods = null) =>
|
||||
new DrawableStoryboard(this, mods);
|
||||
|
||||
private static readonly string[] image_extensions = { @".png", @".jpg" };
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Storyboards
|
||||
|
||||
public double StartTime { get; }
|
||||
|
||||
public StoryboardVideo(string path, int offset)
|
||||
public StoryboardVideo(string path, double offset)
|
||||
{
|
||||
Path = path;
|
||||
StartTime = offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user