mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Merge pull request #7538 from peppy/decouple-blueprint-container
Decouple blueprint container to allow usage in timeline
This commit is contained in:
@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
private IBeatmapProcessor beatmapProcessor;
|
||||
|
||||
private DrawableEditRulesetWrapper<TObject> drawableRulesetWrapper;
|
||||
private BlueprintContainer blueprintContainer;
|
||||
private ComposeBlueprintContainer blueprintContainer;
|
||||
private Container distanceSnapGridContainer;
|
||||
private DistanceSnapGrid distanceSnapGrid;
|
||||
private readonly List<Container> layerContainers = new List<Container>();
|
||||
@ -95,7 +95,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
new EditorPlayfieldBorder { RelativeSizeAxes = Axes.Both }
|
||||
});
|
||||
|
||||
var layerAboveRuleset = drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer().WithChild(blueprintContainer = new BlueprintContainer());
|
||||
var layerAboveRuleset = drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer().WithChild(blueprintContainer = CreateBlueprintContainer());
|
||||
|
||||
layerContainers.Add(layerBelowRuleset);
|
||||
layerContainers.Add(layerAboveRuleset);
|
||||
@ -233,6 +233,8 @@ namespace osu.Game.Rulesets.Edit
|
||||
|
||||
protected abstract IReadOnlyList<HitObjectCompositionTool> CompositionTools { get; }
|
||||
|
||||
protected abstract ComposeBlueprintContainer CreateBlueprintContainer();
|
||||
|
||||
protected abstract DrawableRuleset<TObject> CreateDrawableRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods = null);
|
||||
|
||||
public void BeginPlacement(HitObject hitObject)
|
||||
@ -309,17 +311,6 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// </summary>
|
||||
public abstract bool CursorInPlacementArea { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="SelectionBlueprint"/> for a specific <see cref="DrawableHitObject"/>.
|
||||
/// </summary>
|
||||
/// <param name="hitObject">The <see cref="DrawableHitObject"/> to create the overlay for.</param>
|
||||
public virtual SelectionBlueprint CreateBlueprintFor(DrawableHitObject hitObject) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="SelectionHandler"/> which outlines <see cref="DrawableHitObject"/>s and handles movement of selections.
|
||||
/// </summary>
|
||||
public virtual SelectionHandler CreateSelectionHandler() => new SelectionHandler();
|
||||
|
||||
/// <summary>
|
||||
/// Creates the <see cref="DistanceSnapGrid"/> applicable for a <see cref="HitObject"/> selection.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user