mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Merge pull request #29448 from OliBomby/scroll-speed-std
Hide scroll speed changes in std and ctb editor
This commit is contained in:
commit
b1530e43be
@ -254,5 +254,7 @@ namespace osu.Game.Rulesets.Catch
|
||||
|
||||
return adjustedDifficulty;
|
||||
}
|
||||
|
||||
public override bool EditorShowScrollSpeed => false;
|
||||
}
|
||||
}
|
||||
|
@ -359,5 +359,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
|
||||
return adjustedDifficulty;
|
||||
}
|
||||
|
||||
public override bool EditorShowScrollSpeed => false;
|
||||
}
|
||||
}
|
||||
|
@ -401,5 +401,10 @@ namespace osu.Game.Rulesets
|
||||
new DifficultySection(),
|
||||
new ColoursSection(),
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Can be overridden to avoid showing scroll speed changes in the editor.
|
||||
/// </summary>
|
||||
public virtual bool EditorShowScrollSpeed => true;
|
||||
}
|
||||
}
|
||||
|
@ -64,8 +64,6 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
MaxValue = time_span_max
|
||||
};
|
||||
|
||||
ScrollVisualisationMethod IDrawableScrollingRuleset.VisualisationMethod => VisualisationMethod;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the player can change <see cref="TimeRange"/>.
|
||||
/// </summary>
|
||||
|
@ -1,8 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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
|
||||
{
|
||||
/// <summary>
|
||||
@ -10,8 +8,6 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
/// </summary>
|
||||
public interface IDrawableScrollingRuleset
|
||||
{
|
||||
ScrollVisualisationMethod VisualisationMethod { get; }
|
||||
|
||||
IScrollingInfo ScrollingInfo { get; }
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,14 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
||||
{
|
||||
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;
|
||||
|
@ -5,9 +5,7 @@ using osu.Framework.Allocation;
|
||||
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 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
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()
|
||||
|
@ -15,6 +15,10 @@ namespace osu.Game.Screens.Edit.Timing.RowAttributes
|
||||
|
||||
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 @@ namespace osu.Game.Screens.Edit.Timing.RowAttributes
|
||||
{
|
||||
Content.AddRange(new Drawable[]
|
||||
{
|
||||
new AttributeProgressBar(Point)
|
||||
progressBar = new AttributeProgressBar(Point)
|
||||
{
|
||||
Current = scrollSpeed,
|
||||
},
|
||||
@ -36,6 +40,12 @@ namespace osu.Game.Screens.Edit.Timing.RowAttributes
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user