diff --git a/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectColumnMaskLayer.cs b/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectColumnMaskLayer.cs deleted file mode 100644 index 6886ff83f7..0000000000 --- a/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectColumnMaskLayer.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Rulesets.Edit; -using osu.Game.Rulesets.Mania.UI; -using osu.Game.Screens.Edit.Screens.Compose.Layers; - -namespace osu.Game.Rulesets.Mania.Edit.Layers.Selection.Overlays -{ - public class ManiaHitObjectColumnMaskLayer : HitObjectMaskLayer - { - public readonly Column Column; - - public ManiaHitObjectColumnMaskLayer(ManiaEditPlayfield playfield, HitObjectComposer composer, Column column) - : base(playfield, composer) - { - Column = column; - } - - public void CreateMasks() => AddMasks(); - - protected override void AddMasks() - { - foreach (var obj in Column.HitObjects.Objects) - AddMask(obj); - } - } -} diff --git a/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectMaskLayer.cs b/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectMaskLayer.cs deleted file mode 100644 index 012fc495b5..0000000000 --- a/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectMaskLayer.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Rulesets.Edit; -using osu.Game.Screens.Edit.Screens.Compose.Layers; -using System.Collections.Generic; - -namespace osu.Game.Rulesets.Mania.Edit.Layers.Selection.Overlays -{ - public class ManiaHitObjectMaskLayer : HitObjectMaskLayer - { - public readonly List Stages; - - public ManiaHitObjectMaskLayer(ManiaEditPlayfield playfield, HitObjectComposer composer) - : base(playfield, composer) - { - Stages = new List(); - foreach (var s in ((ManiaEditPlayfield)Playfield).Stages) - Stages.Add(new ManiaHitObjectStageMaskLayer((ManiaEditPlayfield)Playfield, Composer, s)); - } - - protected override void AddMasks() - { - foreach (var s in Stages) - s.CreateMasks(); - } - } -} diff --git a/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectStageMaskLayer.cs b/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectStageMaskLayer.cs deleted file mode 100644 index ae800019c5..0000000000 --- a/osu.Game.Rulesets.Mania/Edit/Layers/Selection/Overlays/ManiaHitObjectStageMaskLayer.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Rulesets.Edit; -using osu.Game.Rulesets.Mania.UI; -using osu.Game.Screens.Edit.Screens.Compose.Layers; -using System.Collections.Generic; - -namespace osu.Game.Rulesets.Mania.Edit.Layers.Selection.Overlays -{ - public class ManiaHitObjectStageMaskLayer : HitObjectMaskLayer - { - public readonly List Columns; - - public ManiaHitObjectStageMaskLayer(ManiaEditPlayfield playfield, HitObjectComposer composer, ManiaStage s) - : base(playfield, composer) - { - Columns = new List(); - foreach (var c in s.Columns) - Columns.Add(new ManiaHitObjectColumnMaskLayer((ManiaEditPlayfield)Playfield, Composer, c)); - } - - public void CreateMasks() => AddMasks(); - - protected override void AddMasks() - { - foreach (var c in Columns) - c.CreateMasks(); - } - } -} diff --git a/osu.Game.Rulesets.Mania/Edit/ManiaHitObjectComposer.cs b/osu.Game.Rulesets.Mania/Edit/ManiaHitObjectComposer.cs index d04c70ae16..b1968d0aff 100644 --- a/osu.Game.Rulesets.Mania/Edit/ManiaHitObjectComposer.cs +++ b/osu.Game.Rulesets.Mania/Edit/ManiaHitObjectComposer.cs @@ -9,7 +9,6 @@ using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.UI; -using osu.Game.Screens.Edit.Screens.Compose.Layers; using System.Collections.Generic; namespace osu.Game.Rulesets.Mania.Edit @@ -41,7 +40,5 @@ namespace osu.Game.Rulesets.Mania.Edit return base.CreateMaskFor(hitObject); } - - protected override HitObjectMaskLayer CreateHitObjectMaskLayer() => new ManiaHitObjectMaskLayer((ManiaEditPlayfield)RulesetContainer.Playfield, this); } } diff --git a/osu.Game/Screens/Edit/Screens/Compose/Layers/HitObjectMaskLayer.cs b/osu.Game/Screens/Edit/Screens/Compose/Layers/HitObjectMaskLayer.cs index ffef177d00..9444e07f85 100644 --- a/osu.Game/Screens/Edit/Screens/Compose/Layers/HitObjectMaskLayer.cs +++ b/osu.Game/Screens/Edit/Screens/Compose/Layers/HitObjectMaskLayer.cs @@ -55,13 +55,18 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers maskContainer, dragLayer.CreateProxy() }; - AddMasks(); + + addMasks(Playfield); } - protected virtual void AddMasks() + private void addMasks(Playfield playfield) { - foreach (var obj in Playfield.HitObjects.Objects) - AddMask(obj); + foreach (var obj in playfield.HitObjects.Objects) + addMask(obj); + + if (playfield.NestedPlayfields != null) + foreach (var p in playfield.NestedPlayfields) + addMasks(p); } protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) @@ -74,7 +79,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers /// Adds a mask for a which adds movement support. /// /// The to create a mask for. - protected void AddMask(DrawableHitObject hitObject) + private void addMask(DrawableHitObject hitObject) { var mask = Composer.CreateMaskFor(hitObject); if (mask == null)