1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:17:26 +08:00

Rename DrawableEditRuleset -> DrawableEditRulesetWrapper

This commit is contained in:
smoogipoo 2019-08-29 18:20:43 +09:00
parent 87e28ab1f9
commit 714ee312da
2 changed files with 16 additions and 13 deletions

View File

@ -11,7 +11,10 @@ using osu.Game.Screens.Edit;
namespace osu.Game.Rulesets.Edit
{
public class DrawableEditRuleset<TObject> : CompositeDrawable
/// <summary>
/// A wrapper for a <see cref="DrawableRuleset{TObject}"/>. Handles adding visual representations of <see cref="HitObject"/>s to the underlying <see cref="DrawableRuleset{TObject}"/>.
/// </summary>
internal class DrawableEditRulesetWrapper<TObject> : CompositeDrawable
where TObject : HitObject
{
public Playfield Playfield => drawableRuleset.Playfield;
@ -21,7 +24,7 @@ namespace osu.Game.Rulesets.Edit
[Resolved]
private IEditorBeatmap<TObject> beatmap { get; set; }
public DrawableEditRuleset(DrawableRuleset<TObject> drawableRuleset)
public DrawableEditRulesetWrapper(DrawableRuleset<TObject> drawableRuleset)
{
this.drawableRuleset = drawableRuleset;

View File

@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Edit
private EditorBeatmap<TObject> editorBeatmap;
private IBeatmapProcessor beatmapProcessor;
private DrawableEditRuleset<TObject> drawableRuleset;
private DrawableEditRulesetWrapper<TObject> drawableRulesetWrapper;
private BlueprintContainer blueprintContainer;
private readonly List<Container> layerContainers = new List<Container>();
@ -55,7 +55,7 @@ namespace osu.Game.Rulesets.Edit
{
try
{
drawableRuleset = new DrawableEditRuleset<TObject>(CreateDrawableRuleset(Ruleset, workingBeatmap.Value, Array.Empty<Mod>()))
drawableRulesetWrapper = new DrawableEditRulesetWrapper<TObject>(CreateDrawableRuleset(Ruleset, workingBeatmap.Value, Array.Empty<Mod>()))
{
Clock = framedClock
};
@ -66,10 +66,10 @@ namespace osu.Game.Rulesets.Edit
return;
}
var layerBelowRuleset = drawableRuleset.CreatePlayfieldAdjustmentContainer();
var layerBelowRuleset = drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer();
layerBelowRuleset.Child = new EditorPlayfieldBorder { RelativeSizeAxes = Axes.Both };
var layerAboveRuleset = drawableRuleset.CreatePlayfieldAdjustmentContainer();
var layerAboveRuleset = drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer();
layerAboveRuleset.Child = blueprintContainer = new BlueprintContainer();
layerContainers.Add(layerBelowRuleset);
@ -100,7 +100,7 @@ namespace osu.Game.Rulesets.Edit
Children = new Drawable[]
{
layerBelowRuleset,
drawableRuleset,
drawableRulesetWrapper,
layerAboveRuleset
}
}
@ -153,10 +153,10 @@ namespace osu.Game.Rulesets.Edit
layerContainers.ForEach(l =>
{
l.Anchor = drawableRuleset.Playfield.Anchor;
l.Origin = drawableRuleset.Playfield.Origin;
l.Position = drawableRuleset.Playfield.Position;
l.Size = drawableRuleset.Playfield.Size;
l.Anchor = drawableRulesetWrapper.Playfield.Anchor;
l.Origin = drawableRulesetWrapper.Playfield.Origin;
l.Position = drawableRulesetWrapper.Playfield.Position;
l.Size = drawableRulesetWrapper.Playfield.Size;
});
}
@ -173,8 +173,8 @@ namespace osu.Game.Rulesets.Edit
beatmapProcessor?.PostProcess();
}
public override IEnumerable<DrawableHitObject> HitObjects => drawableRuleset.Playfield.AllHitObjects;
public override bool CursorInPlacementArea => drawableRuleset.Playfield.ReceivePositionalInputAt(inputManager.CurrentState.Mouse.Position);
public override IEnumerable<DrawableHitObject> HitObjects => drawableRulesetWrapper.Playfield.AllHitObjects;
public override bool CursorInPlacementArea => drawableRulesetWrapper.Playfield.ReceivePositionalInputAt(inputManager.CurrentState.Mouse.Position);
protected abstract IReadOnlyList<HitObjectCompositionTool> CompositionTools { get; }