diff --git a/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs b/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
index b3e6fe382a..a90b0d3e89 100644
--- a/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
+++ b/osu.Game.Rulesets.Catch/Edit/CatchHitObjectComposer.cs
@@ -24,10 +24,7 @@
namespace osu.Game.Rulesets.Catch.Edit
{
- ///
- /// todo: should inherit once it supports distance spacing properly.
- ///
- public class CatchHitObjectComposer : HitObjectComposer
+ public class CatchHitObjectComposer : DistancedHitObjectComposer
{
private const float distance_snap_radius = 50;
@@ -45,6 +42,10 @@ public CatchHitObjectComposer(CatchRuleset ruleset)
[BackgroundDependencyLoader]
private void load()
{
+ // todo: enable distance spacing once catch supports it.
+ RightSideToolboxContainer.Alpha = 0;
+ DistanceSpacingMultiplier.Disabled = true;
+
LayerBelowRuleset.Add(new PlayfieldBorder
{
RelativeSizeAxes = Axes.Both,
diff --git a/osu.Game/Rulesets/Edit/DistancedHitObjectComposer.cs b/osu.Game/Rulesets/Edit/DistancedHitObjectComposer.cs
index a3624f6d77..d0c9babf24 100644
--- a/osu.Game/Rulesets/Edit/DistancedHitObjectComposer.cs
+++ b/osu.Game/Rulesets/Edit/DistancedHitObjectComposer.cs
@@ -45,6 +45,7 @@ private void load()
{
AddInternal(RightSideToolboxContainer = new ExpandingToolboxContainer
{
+ Alpha = DistanceSpacingMultiplier.Disabled ? 0 : 1,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Child = new EditorToolboxGroup("snapping")
@@ -62,18 +63,21 @@ protected override void LoadComplete()
{
base.LoadComplete();
- DistanceSpacingMultiplier.Value = EditorBeatmap.BeatmapInfo.DistanceSpacing;
- DistanceSpacingMultiplier.BindValueChanged(v =>
+ if (!DistanceSpacingMultiplier.Disabled)
{
- distanceSpacingSlider.ContractedLabelText = $"D. S. ({v.NewValue:0.##x})";
- distanceSpacingSlider.ExpandedLabelText = $"Distance Spacing ({v.NewValue:0.##x})";
- EditorBeatmap.BeatmapInfo.DistanceSpacing = v.NewValue;
- }, true);
+ DistanceSpacingMultiplier.Value = EditorBeatmap.BeatmapInfo.DistanceSpacing;
+ DistanceSpacingMultiplier.BindValueChanged(v =>
+ {
+ distanceSpacingSlider.ContractedLabelText = $"D. S. ({v.NewValue:0.##x})";
+ distanceSpacingSlider.ExpandedLabelText = $"Distance Spacing ({v.NewValue:0.##x})";
+ EditorBeatmap.BeatmapInfo.DistanceSpacing = v.NewValue;
+ }, true);
+ }
}
protected override bool OnKeyDown(KeyDownEvent e)
{
- if (e.ControlPressed && e.AltPressed && !e.Repeat)
+ if (!DistanceSpacingMultiplier.Disabled && e.ControlPressed && e.AltPressed && !e.Repeat)
{
RightSideToolboxContainer.Expanded.Value = true;
distanceSpacingScrollActive = true;
@@ -85,7 +89,7 @@ protected override bool OnKeyDown(KeyDownEvent e)
protected override void OnKeyUp(KeyUpEvent e)
{
- if (distanceSpacingScrollActive && (!e.AltPressed || !e.ControlPressed))
+ if (!DistanceSpacingMultiplier.Disabled && distanceSpacingScrollActive && (!e.AltPressed || !e.ControlPressed))
{
RightSideToolboxContainer.Expanded.Value = false;
distanceSpacingScrollActive = false;