1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 19:52:55 +08:00

Fix using FadeTo on a visibility container

This commit is contained in:
Dean Herbert 2023-01-17 18:35:30 +09:00
parent 48959c0212
commit 81aa7feeb5

View File

@ -78,25 +78,27 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
{
foreach (var counter in CounterFlow.Children)
{
if (counter.Result.Type.IsBasic())
{
if (shouldShow(counter))
counter.Show();
continue;
}
else
counter.Hide();
}
bool shouldShow(JudgementCounter counter)
{
if (counter.Result.Type.IsBasic())
return true;
switch (Mode.Value)
{
case DisplayMode.Simple:
counter.Hide();
break;
return false;
case DisplayMode.Normal:
counter.FadeTo(counter.Result.Type.IsBonus() ? 0 : 1);
break;
return !counter.Result.Type.IsBonus();
case DisplayMode.All:
counter.Show();
break;
return true;
default:
throw new ArgumentOutOfRangeException();