mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Merge pull request #9143 from peppy/editor-create-composer-fix
Pass hitobjects as a parameter to CreateBlueprintContainer
This commit is contained in:
@ -13,6 +13,7 @@ using osu.Game.Rulesets.Mania.Objects.Drawables.Pieces;
|
|||||||
using osu.Game.Rulesets.Mania.UI;
|
using osu.Game.Rulesets.Mania.UI;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Rulesets.UI.Scrolling;
|
using osu.Game.Rulesets.UI.Scrolling;
|
||||||
using osu.Game.Screens.Edit.Compose.Components;
|
using osu.Game.Screens.Edit.Compose.Components;
|
||||||
@ -88,7 +89,8 @@ namespace osu.Game.Rulesets.Mania.Edit
|
|||||||
return drawableRuleset;
|
return drawableRuleset;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ComposeBlueprintContainer CreateBlueprintContainer() => new ManiaBlueprintContainer(drawableRuleset.Playfield.AllHitObjects);
|
protected override ComposeBlueprintContainer CreateBlueprintContainer(IEnumerable<DrawableHitObject> hitObjects)
|
||||||
|
=> new ManiaBlueprintContainer(hitObjects);
|
||||||
|
|
||||||
protected override IReadOnlyList<HitObjectCompositionTool> CompositionTools => new HitObjectCompositionTool[]
|
protected override IReadOnlyList<HitObjectCompositionTool> CompositionTools => new HitObjectCompositionTool[]
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,7 @@ using osu.Game.Rulesets.Edit;
|
|||||||
using osu.Game.Rulesets.Edit.Tools;
|
using osu.Game.Rulesets.Edit.Tools;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Objects;
|
using osu.Game.Rulesets.Osu.Objects;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Screens.Edit.Compose.Components;
|
using osu.Game.Screens.Edit.Compose.Components;
|
||||||
@ -46,7 +47,8 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
EditorBeatmap.PlacementObject.ValueChanged += _ => updateDistanceSnapGrid();
|
EditorBeatmap.PlacementObject.ValueChanged += _ => updateDistanceSnapGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ComposeBlueprintContainer CreateBlueprintContainer() => new OsuBlueprintContainer(HitObjects);
|
protected override ComposeBlueprintContainer CreateBlueprintContainer(IEnumerable<DrawableHitObject> hitObjects)
|
||||||
|
=> new OsuBlueprintContainer(hitObjects);
|
||||||
|
|
||||||
private DistanceSnapGrid distanceSnapGrid;
|
private DistanceSnapGrid distanceSnapGrid;
|
||||||
private Container distanceSnapGridContainer;
|
private Container distanceSnapGridContainer;
|
||||||
|
@ -113,7 +113,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
drawableRulesetWrapper,
|
drawableRulesetWrapper,
|
||||||
// layers above playfield
|
// layers above playfield
|
||||||
drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer()
|
drawableRulesetWrapper.CreatePlayfieldAdjustmentContainer()
|
||||||
.WithChild(BlueprintContainer = CreateBlueprintContainer())
|
.WithChild(BlueprintContainer = CreateBlueprintContainer(HitObjects))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -159,7 +159,9 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a relevant blueprint container. This will manage hitobject selection/placement input handling and display logic.
|
/// Construct a relevant blueprint container. This will manage hitobject selection/placement input handling and display logic.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected abstract ComposeBlueprintContainer CreateBlueprintContainer();
|
/// <param name="hitObjects">A live collection of all <see cref="DrawableHitObject"/>s in the editor beatmap.</param>
|
||||||
|
protected virtual ComposeBlueprintContainer CreateBlueprintContainer(IEnumerable<DrawableHitObject> hitObjects)
|
||||||
|
=> new ComposeBlueprintContainer(hitObjects);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a drawable ruleset for the provided ruleset.
|
/// Construct a drawable ruleset for the provided ruleset.
|
||||||
|
Reference in New Issue
Block a user