diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs deleted file mode 100644 index 25d50a97be..0000000000 --- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Game.Beatmaps.ControlPoints; - -namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts -{ - public partial class EffectPointVisualisation : CompositeDrawable, IControlPointVisualisation - { - private readonly EffectControlPoint effect; - - [Resolved] - private EditorBeatmap beatmap { get; set; } = null!; - - public EffectPointVisualisation(EffectControlPoint point) - { - RelativePositionAxes = Axes.Both; - RelativeSizeAxes = Axes.Y; - - effect = point; - } - - [BackgroundDependencyLoader] - private void load() - { - if (beatmap.BeatmapInfo.Ruleset.CreateInstance().EditorShowScrollSpeed) - { - AddInternal(new ControlPointVisualisation(effect) - { - // importantly, override the x position being set since we do that in the GroupVisualisation parent drawable. - X = 0, - }); - } - } - - public bool IsVisuallyRedundant(ControlPoint other) => other is EffectControlPoint; - } -} diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/GroupVisualisation.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/GroupVisualisation.cs index b872c3725c..0dd945805b 100644 --- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/GroupVisualisation.cs +++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/GroupVisualisation.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System.Linq; +using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -15,6 +16,8 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts private readonly IBindableList controlPoints = new BindableList(); + private bool showScrollSpeed; + public GroupVisualisation(ControlPointGroup group) { RelativePositionAxes = Axes.X; @@ -24,8 +27,13 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts Group = group; X = (float)group.Time; + } + + [BackgroundDependencyLoader] + private void load(EditorBeatmap beatmap) + { + showScrollSpeed = beatmap.BeatmapInfo.Ruleset.CreateInstance().EditorShowScrollSpeed; - // Run in constructor so IsRedundant calls can work correctly. controlPoints.BindTo(Group.ControlPoints); controlPoints.BindCollectionChanged((_, _) => { @@ -47,8 +55,15 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts }); break; - case EffectControlPoint effect: - AddInternal(new EffectPointVisualisation(effect)); + case EffectControlPoint: + if (!showScrollSpeed) + return; + + AddInternal(new ControlPointVisualisation(point) + { + // importantly, override the x position being set since we do that above. + X = 0, + }); break; } }