From fd6b77ea9295041500bb1316cd3cedd87e32ed38 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 27 Jun 2024 23:54:48 +0900 Subject: [PATCH] Fix distance snap control being removed --- osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs | 9 +++------ osu.Game/Rulesets/Edit/HitObjectComposer.cs | 4 +++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs b/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs index ecebf6d7b1..f93874481d 100644 --- a/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs +++ b/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs @@ -51,6 +51,8 @@ namespace osu.Game.Rulesets.Osu.Edit private readonly Bindable rectangularGridSnapToggle = new Bindable(); + protected override Drawable CreateHitObjectInspector() => new OsuHitObjectInspector(); + protected override IEnumerable CreateTernaryButtons() => base.CreateTernaryButtons() .Concat(DistanceSnapProvider.CreateTernaryButtons()) @@ -101,13 +103,8 @@ namespace osu.Game.Rulesets.Osu.Edit updatePositionSnapGrid(); - RightToolbox.Clear(); - RightToolbox.AddRange(new[] + RightToolbox.AddRange(new Drawable[] { - new EditorToolboxGroup("inspector") - { - Child = new OsuHitObjectInspector(), - }, OsuGridToolboxGroup, new TransformToolboxGroup { diff --git a/osu.Game/Rulesets/Edit/HitObjectComposer.cs b/osu.Game/Rulesets/Edit/HitObjectComposer.cs index 7d593c03ec..540e0440c6 100644 --- a/osu.Game/Rulesets/Edit/HitObjectComposer.cs +++ b/osu.Game/Rulesets/Edit/HitObjectComposer.cs @@ -207,7 +207,7 @@ namespace osu.Game.Rulesets.Edit { Child = new EditorToolboxGroup("inspector") { - Child = new HitObjectInspector() + Child = CreateHitObjectInspector() }, } } @@ -329,6 +329,8 @@ namespace osu.Game.Rulesets.Edit /// protected virtual ComposeBlueprintContainer CreateBlueprintContainer() => new ComposeBlueprintContainer(this); + protected virtual Drawable CreateHitObjectInspector() => new HitObjectInspector(); + /// /// Construct a drawable ruleset for the provided ruleset. ///