1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 21:07:33 +08:00

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.
This commit is contained in:
Salman Ahmed 2020-02-02 14:46:50 +03:00
parent ed48e3014c
commit abccf05155

View File

@ -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;