diff --git a/osu.Game.Rulesets.Catch/CatchRuleset.cs b/osu.Game.Rulesets.Catch/CatchRuleset.cs index 3edc23a8b750..7eaf4f2b1869 100644 --- a/osu.Game.Rulesets.Catch/CatchRuleset.cs +++ b/osu.Game.Rulesets.Catch/CatchRuleset.cs @@ -254,5 +254,7 @@ public override BeatmapDifficulty GetRateAdjustedDisplayDifficulty(IBeatmapDiffi return adjustedDifficulty; } + + public override bool EditorShowScrollSpeed => false; } } diff --git a/osu.Game.Rulesets.Osu/OsuRuleset.cs b/osu.Game.Rulesets.Osu/OsuRuleset.cs index 7042ad0cd440..be48ef9acc47 100644 --- a/osu.Game.Rulesets.Osu/OsuRuleset.cs +++ b/osu.Game.Rulesets.Osu/OsuRuleset.cs @@ -359,5 +359,7 @@ public override BeatmapDifficulty GetRateAdjustedDisplayDifficulty(IBeatmapDiffi return adjustedDifficulty; } + + public override bool EditorShowScrollSpeed => false; } } diff --git a/osu.Game/Rulesets/Ruleset.cs b/osu.Game/Rulesets/Ruleset.cs index fb0e225c94f2..5af1fd386c3a 100644 --- a/osu.Game/Rulesets/Ruleset.cs +++ b/osu.Game/Rulesets/Ruleset.cs @@ -401,5 +401,10 @@ public virtual IEnumerable CreateEditorSetupSections() => new DifficultySection(), new ColoursSection(), ]; + + /// + /// Can be overridden to avoid showing scroll speed changes in the editor. + /// + public virtual bool EditorShowScrollSpeed => true; } } diff --git a/osu.Game/Rulesets/UI/Scrolling/DrawableScrollingRuleset.cs b/osu.Game/Rulesets/UI/Scrolling/DrawableScrollingRuleset.cs index d23658ac3304..ba3a9bd48341 100644 --- a/osu.Game/Rulesets/UI/Scrolling/DrawableScrollingRuleset.cs +++ b/osu.Game/Rulesets/UI/Scrolling/DrawableScrollingRuleset.cs @@ -64,8 +64,6 @@ public abstract partial class DrawableScrollingRuleset : DrawableRulese MaxValue = time_span_max }; - ScrollVisualisationMethod IDrawableScrollingRuleset.VisualisationMethod => VisualisationMethod; - /// /// Whether the player can change . /// diff --git a/osu.Game/Rulesets/UI/Scrolling/IDrawableScrollingRuleset.cs b/osu.Game/Rulesets/UI/Scrolling/IDrawableScrollingRuleset.cs index b348a220093f..27531492d6d6 100644 --- a/osu.Game/Rulesets/UI/Scrolling/IDrawableScrollingRuleset.cs +++ b/osu.Game/Rulesets/UI/Scrolling/IDrawableScrollingRuleset.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Game.Configuration; - namespace osu.Game.Rulesets.UI.Scrolling { /// @@ -10,8 +8,6 @@ namespace osu.Game.Rulesets.UI.Scrolling /// public interface IDrawableScrollingRuleset { - ScrollVisualisationMethod VisualisationMethod { get; } - IScrollingInfo ScrollingInfo { get; } } } diff --git a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs index 17fedb933a89..b4e6d1ece2f9 100644 --- a/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs +++ b/osu.Game/Screens/Edit/Components/Timelines/Summary/Parts/EffectPointVisualisation.cs @@ -79,7 +79,14 @@ private void refreshDisplay() { ClearInternal(); - AddInternal(new ControlPointVisualisation(effect)); + 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, + }); + } if (!kiai.Value) return; diff --git a/osu.Game/Screens/Edit/Timing/EffectSection.cs b/osu.Game/Screens/Edit/Timing/EffectSection.cs index f321f7eeb0a3..a4b9f37dffd6 100644 --- a/osu.Game/Screens/Edit/Timing/EffectSection.cs +++ b/osu.Game/Screens/Edit/Timing/EffectSection.cs @@ -5,9 +5,7 @@ using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Game.Beatmaps.ControlPoints; -using osu.Game.Configuration; using osu.Game.Graphics.UserInterfaceV2; -using osu.Game.Rulesets.UI.Scrolling; namespace osu.Game.Screens.Edit.Timing { @@ -38,8 +36,7 @@ protected override void LoadComplete() kiai.Current.BindValueChanged(_ => saveChanges()); scrollSpeedSlider.Current.BindValueChanged(_ => saveChanges()); - var drawableRuleset = Beatmap.BeatmapInfo.Ruleset.CreateInstance().CreateDrawableRulesetWith(Beatmap.PlayableBeatmap); - if (drawableRuleset is not IDrawableScrollingRuleset scrollingRuleset || scrollingRuleset.VisualisationMethod == ScrollVisualisationMethod.Constant) + if (!Beatmap.BeatmapInfo.Ruleset.CreateInstance().EditorShowScrollSpeed) scrollSpeedSlider.Hide(); void saveChanges() diff --git a/osu.Game/Screens/Edit/Timing/RowAttributes/EffectRowAttribute.cs b/osu.Game/Screens/Edit/Timing/RowAttributes/EffectRowAttribute.cs index ad22aa81fc7b..87ee675e7f0e 100644 --- a/osu.Game/Screens/Edit/Timing/RowAttributes/EffectRowAttribute.cs +++ b/osu.Game/Screens/Edit/Timing/RowAttributes/EffectRowAttribute.cs @@ -15,6 +15,10 @@ public partial class EffectRowAttribute : RowAttribute private AttributeText kiaiModeBubble = null!; private AttributeText text = null!; + private AttributeProgressBar progressBar = null!; + + [Resolved] + protected EditorBeatmap Beatmap { get; private set; } = null!; public EffectRowAttribute(EffectControlPoint effect) : base(effect, "effect") @@ -28,7 +32,7 @@ private void load() { Content.AddRange(new Drawable[] { - new AttributeProgressBar(Point) + progressBar = new AttributeProgressBar(Point) { Current = scrollSpeed, }, @@ -36,6 +40,12 @@ private void load() kiaiModeBubble = new AttributeText(Point) { Text = "kiai" }, }); + if (!Beatmap.BeatmapInfo.Ruleset.CreateInstance().EditorShowScrollSpeed) + { + text.Hide(); + progressBar.Hide(); + } + kiaiMode.BindValueChanged(enabled => kiaiModeBubble.FadeTo(enabled.NewValue ? 1 : 0), true); scrollSpeed.BindValueChanged(_ => updateText(), true); }