1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-16 00:37:19 +08:00

Hide scroll speed slider on rulesets which don't support it

This commit is contained in:
Salman Ahmed 2022-11-19 06:40:20 +03:00
parent 4648e7bee0
commit 290369db47

View File

@ -8,6 +8,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Rulesets.UI.Scrolling;
namespace osu.Game.Screens.Edit.Timing
{
@ -41,6 +42,12 @@ 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)
scrollSpeedSlider.Hide();
void saveChanges()
{
if (!isRebinding) ChangeHandler?.SaveState();