Make test cases more compact, add two way toggles

This commit is contained in:
David Zhao
2019-02-28 20:01:15 +09:00
parent 19d529c1c8
commit e3338e94d1
4 changed files with 66 additions and 94 deletions

View File

@ -16,6 +16,8 @@ namespace osu.Game.Graphics.Containers
/// </summary>
public class UserDimContainer : Container
{
private const float background_fade_duration = 800;
protected Bindable<double> DimLevel { get; private set; }
protected Bindable<bool> ShowStoryboard { get; private set; }
@ -30,14 +32,12 @@ namespace osu.Game.Graphics.Containers
/// </summary>
public readonly Bindable<bool> StoryboardReplacesBackground = new Bindable<bool>();
protected Container DimContainer { get; private set; }
protected Container DimContainer { get; }
protected override Container<Drawable> Content => DimContainer;
private readonly bool isStoryboard;
private const float background_fade_duration = 800;
/// <summary>
/// Creates a new <see cref="UserDimContainer" />.
/// </summary>
@ -48,9 +48,8 @@ namespace osu.Game.Graphics.Containers
/// </param>
public UserDimContainer(bool isStoryboard = false)
{
DimContainer = new Container { RelativeSizeAxes = Axes.Both };
this.isStoryboard = isStoryboard;
AddInternal(DimContainer);
AddInternal(DimContainer = new Container { RelativeSizeAxes = Axes.Both });
}
[BackgroundDependencyLoader]