mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Fix using FadeTo
on a visibility container
This commit is contained in:
parent
48959c0212
commit
81aa7feeb5
@ -78,25 +78,27 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
|
|||||||
{
|
{
|
||||||
foreach (var counter in CounterFlow.Children)
|
foreach (var counter in CounterFlow.Children)
|
||||||
{
|
{
|
||||||
if (counter.Result.Type.IsBasic())
|
if (shouldShow(counter))
|
||||||
{
|
|
||||||
counter.Show();
|
counter.Show();
|
||||||
continue;
|
else
|
||||||
}
|
counter.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool shouldShow(JudgementCounter counter)
|
||||||
|
{
|
||||||
|
if (counter.Result.Type.IsBasic())
|
||||||
|
return true;
|
||||||
|
|
||||||
switch (Mode.Value)
|
switch (Mode.Value)
|
||||||
{
|
{
|
||||||
case DisplayMode.Simple:
|
case DisplayMode.Simple:
|
||||||
counter.Hide();
|
return false;
|
||||||
break;
|
|
||||||
|
|
||||||
case DisplayMode.Normal:
|
case DisplayMode.Normal:
|
||||||
counter.FadeTo(counter.Result.Type.IsBonus() ? 0 : 1);
|
return !counter.Result.Type.IsBonus();
|
||||||
break;
|
|
||||||
|
|
||||||
case DisplayMode.All:
|
case DisplayMode.All:
|
||||||
counter.Show();
|
return true;
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
|
Loading…
Reference in New Issue
Block a user