diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index db71ff4e84..5d2d782063 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -184,6 +184,7 @@ namespace osu.Game.Configuration SetDefault(OsuSetting.EditorShowHitMarkers, true); SetDefault(OsuSetting.EditorAutoSeekOnPlacement, true); SetDefault(OsuSetting.EditorLimitedDistanceSnap, false); + SetDefault(OsuSetting.EditorShowSpeedChanges, false); SetDefault(OsuSetting.LastProcessedMetadataId, -1); @@ -407,5 +408,6 @@ namespace osu.Game.Configuration EditorLimitedDistanceSnap, ReplaySettingsOverlay, AutomaticallyDownloadMissingBeatmaps, + EditorShowSpeedChanges } } diff --git a/osu.Game/Rulesets/Edit/ScrollingHitObjectComposer.cs b/osu.Game/Rulesets/Edit/ScrollingHitObjectComposer.cs index 75305a0c20..cb92ebbd15 100644 --- a/osu.Game/Rulesets/Edit/ScrollingHitObjectComposer.cs +++ b/osu.Game/Rulesets/Edit/ScrollingHitObjectComposer.cs @@ -6,6 +6,7 @@ using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; +using osu.Game.Configuration; using osu.Game.Graphics.UserInterface; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.UI.Scrolling; @@ -18,6 +19,7 @@ namespace osu.Game.Rulesets.Edit where TObject : HitObject { private readonly Bindable showSpeedChanges = new Bindable(); + private Bindable configShowSpeedChanges = null!; protected ScrollingHitObjectComposer(Ruleset ruleset) : base(ruleset) @@ -25,7 +27,7 @@ namespace osu.Game.Rulesets.Edit } [BackgroundDependencyLoader] - private void load() + private void load(OsuConfigManager config) { if (DrawableRuleset is ISupportConstantAlgorithmToggle toggleRuleset) { @@ -44,7 +46,16 @@ namespace osu.Game.Rulesets.Edit }, }); - showSpeedChanges.BindValueChanged(state => toggleRuleset.ShowSpeedChanges.Value = state.NewValue == TernaryState.True, true); + configShowSpeedChanges = config.GetBindable(OsuSetting.EditorShowSpeedChanges); + configShowSpeedChanges.BindValueChanged(enabled => showSpeedChanges.Value = enabled.NewValue ? TernaryState.True : TernaryState.False, true); + + showSpeedChanges.BindValueChanged(state => + { + bool enabled = state.NewValue == TernaryState.True; + + toggleRuleset.ShowSpeedChanges.Value = enabled; + configShowSpeedChanges.Value = enabled; + }, true); } } }