1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Fix distance snap control being removed

This commit is contained in:
Dean Herbert 2024-06-27 23:54:48 +09:00
parent b293eb7930
commit fd6b77ea92
No known key found for this signature in database
2 changed files with 6 additions and 7 deletions

View File

@ -51,6 +51,8 @@ namespace osu.Game.Rulesets.Osu.Edit
private readonly Bindable<TernaryState> rectangularGridSnapToggle = new Bindable<TernaryState>(); private readonly Bindable<TernaryState> rectangularGridSnapToggle = new Bindable<TernaryState>();
protected override Drawable CreateHitObjectInspector() => new OsuHitObjectInspector();
protected override IEnumerable<TernaryButton> CreateTernaryButtons() protected override IEnumerable<TernaryButton> CreateTernaryButtons()
=> base.CreateTernaryButtons() => base.CreateTernaryButtons()
.Concat(DistanceSnapProvider.CreateTernaryButtons()) .Concat(DistanceSnapProvider.CreateTernaryButtons())
@ -101,13 +103,8 @@ namespace osu.Game.Rulesets.Osu.Edit
updatePositionSnapGrid(); updatePositionSnapGrid();
RightToolbox.Clear(); RightToolbox.AddRange(new Drawable[]
RightToolbox.AddRange(new[]
{ {
new EditorToolboxGroup("inspector")
{
Child = new OsuHitObjectInspector(),
},
OsuGridToolboxGroup, OsuGridToolboxGroup,
new TransformToolboxGroup new TransformToolboxGroup
{ {

View File

@ -207,7 +207,7 @@ namespace osu.Game.Rulesets.Edit
{ {
Child = new EditorToolboxGroup("inspector") Child = new EditorToolboxGroup("inspector")
{ {
Child = new HitObjectInspector() Child = CreateHitObjectInspector()
}, },
} }
} }
@ -329,6 +329,8 @@ namespace osu.Game.Rulesets.Edit
/// </summary> /// </summary>
protected virtual ComposeBlueprintContainer CreateBlueprintContainer() => new ComposeBlueprintContainer(this); protected virtual ComposeBlueprintContainer CreateBlueprintContainer() => new ComposeBlueprintContainer(this);
protected virtual Drawable CreateHitObjectInspector() => new HitObjectInspector();
/// <summary> /// <summary>
/// Construct a drawable ruleset for the provided ruleset. /// Construct a drawable ruleset for the provided ruleset.
/// </summary> /// </summary>