mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Identify scrolling rulesets using temporary DrawableRuleset
instances
This commit is contained in:
parent
58296bd4f0
commit
4b0ba86bd0
@ -7,7 +7,9 @@ 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
|
||||
{
|
||||
@ -41,10 +43,8 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
omitBarLine.Current.BindValueChanged(_ => saveChanges());
|
||||
scrollSpeedSlider.Current.BindValueChanged(_ => saveChanges());
|
||||
|
||||
// adjusting scroll speed on osu/catch rulesets results in undefined behaviour during legacy beatmap decoding, and generally shouldn't be shown.
|
||||
// todo: there should be proper way to identify such rulesets, but this should do for now.
|
||||
var ruleset = Beatmap.BeatmapInfo.Ruleset;
|
||||
if (ruleset.OnlineID == 0 || ruleset.OnlineID == 2)
|
||||
var drawableRuleset = Beatmap.BeatmapInfo.Ruleset.CreateInstance().CreateDrawableRulesetWith(Beatmap.PlayableBeatmap);
|
||||
if (drawableRuleset is not IDrawableScrollingRuleset scrollingRuleset || scrollingRuleset.VisualisationMethod == ScrollVisualisationMethod.Constant)
|
||||
scrollSpeedSlider.Hide();
|
||||
|
||||
void saveChanges()
|
||||
|
Loading…
Reference in New Issue
Block a user