From abccf05155906d24c0b1757f89f3ac0b5f206a11 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sun, 2 Feb 2020 14:46:50 +0300 Subject: [PATCH] Update visibility of each key counter instead of this container For isolating changing visibility of the key counter display based on config and internal values from just fading the container. --- osu.Game/Screens/Play/KeyCounterDisplay.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/KeyCounterDisplay.cs b/osu.Game/Screens/Play/KeyCounterDisplay.cs index 9c107f0293..5672042a98 100644 --- a/osu.Game/Screens/Play/KeyCounterDisplay.cs +++ b/osu.Game/Screens/Play/KeyCounterDisplay.cs @@ -5,6 +5,7 @@ using System; using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; +using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Input.Events; @@ -100,7 +101,9 @@ namespace osu.Game.Screens.Play } } - private void updateVisibility() => this.FadeTo(Visible.Value || configVisibility.Value ? 1 : 0, duration); + private void updateVisibility() => + // Change visibility of all key counters internally to isolate from showing them by fading in this container. + Children.ForEach(k => k.FadeTo(Visible.Value || ConfigVisibility.Value ? 1 : 0, duration)); public override bool HandleNonPositionalInput => receptor == null; public override bool HandlePositionalInput => receptor == null;