Allow individual storyboard layers to disable masking

This commit is contained in:
voidedWarranties 2020-03-23 22:51:37 -07:00
parent f676052528
commit 4bb15a8b93
3 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,6 @@ namespace osu.Game.Screens.Play
return; return;
drawableStoryboard = storyboard.CreateDrawable(); drawableStoryboard = storyboard.CreateDrawable();
drawableStoryboard.Masking = true;
if (async) if (async)
LoadComponentAsync(drawableStoryboard, Add); LoadComponentAsync(drawableStoryboard, Add);

View File

@ -22,6 +22,7 @@ namespace osu.Game.Storyboards.Drawables
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;
Enabled = layer.EnabledWhenPassing; Enabled = layer.EnabledWhenPassing;
Masking = layer.Masking;
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -10,15 +10,17 @@ namespace osu.Game.Storyboards
{ {
public string Name; public string Name;
public int Depth; public int Depth;
public bool Masking;
public bool EnabledWhenPassing = true; public bool EnabledWhenPassing = true;
public bool EnabledWhenFailing = true; public bool EnabledWhenFailing = true;
public List<IStoryboardElement> Elements = new List<IStoryboardElement>(); public List<IStoryboardElement> Elements = new List<IStoryboardElement>();
public StoryboardLayer(string name, int depth) public StoryboardLayer(string name, int depth, bool masking = true)
{ {
Name = name; Name = name;
Depth = depth; Depth = depth;
Masking = masking;
} }
public void Add(IStoryboardElement element) public void Add(IStoryboardElement element)