diff --git a/osu.Game/Graphics/Containers/ParallaxContainer.cs b/osu.Game/Graphics/Containers/ParallaxContainer.cs index 9208c5008a..bc54fd8fdc 100644 --- a/osu.Game/Graphics/Containers/ParallaxContainer.cs +++ b/osu.Game/Graphics/Containers/ParallaxContainer.cs @@ -9,6 +9,7 @@ using osu.Framework.Allocation; using osu.Framework.Graphics.Transformations; using osu.Game.Configuration; +using osu.Framework.Configuration; namespace osu.Game.Graphics.Containers { @@ -16,7 +17,7 @@ class ParallaxContainer : Container { public float ParallaxAmount = 0.02f; - private bool parallaxEnabled = true; + private Bindable parallaxEnabled; public override bool Contains(Vector2 screenSpacePos) => true; @@ -40,14 +41,13 @@ public ParallaxContainer() private void load(UserInputManager input, OsuConfigManager config) { this.input = input; - - config.GetBindable(OsuConfig.MenuParallax).ValueChanged += delegate + parallaxEnabled = config.GetBindable(OsuConfig.MenuParallax); + parallaxEnabled.ValueChanged += delegate { - parallaxEnabled = config.GetBindable(OsuConfig.MenuParallax); if (!parallaxEnabled) { content.MoveTo(Vector2.Zero, firstUpdate ? 0 : 1000, EasingTypes.OutQuint); - content.Scale = Vector2.One; + content.Scale = new Vector2(1 + ParallaxAmount); } }; }