1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 14:23:02 +08:00

Also dim counter during initial calculation phase

This commit is contained in:
Dean Herbert 2021-10-05 17:24:36 +09:00
parent f64226ded6
commit 0859c336de
2 changed files with 9 additions and 2 deletions

View File

@ -68,6 +68,7 @@ namespace osu.Game.Tests.Visual.Gameplay
AddRepeatStep("Add judgement", applyOneJudgement, 10);
AddUntilStep("counter non-zero", () => counter.Current.Value > 0);
AddUntilStep("counter opaque", () => counter.Child.Alpha == 1);
AddStep("Revert judgement", () =>
{

View File

@ -38,6 +38,8 @@ namespace osu.Game.Screens.Play.HUD
protected override double RollingDuration => 1000;
private const float alpha_when_invalid = 0.3f;
[CanBeNull]
[Resolved(CanBeNull = true)]
private ScoreProcessor scoreProcessor { get; set; }
@ -70,6 +72,7 @@ namespace osu.Game.Screens.Play.HUD
.ContinueWith(r => Schedule(() =>
{
timedAttributes = r.Result;
IsValid = true;
if (lastJudgement != null)
onNewJudgement(lastJudgement);
}), TaskContinuationOptions.OnlyOnRanToCompletion);
@ -97,7 +100,7 @@ namespace osu.Game.Screens.Play.HUD
return;
isValid = value;
DrawableCount.FadeTo(isValid ? 1 : 0.3f, 1000, Easing.OutQuint);
DrawableCount.FadeTo(isValid ? 1 : alpha_when_invalid, 1000, Easing.OutQuint);
}
}
@ -133,7 +136,10 @@ namespace osu.Game.Screens.Play.HUD
protected override LocalisableString FormatCount(int count) => count.ToString(@"D");
protected override IHasText CreateText() => new TextComponent();
protected override IHasText CreateText() => new TextComponent
{
Alpha = alpha_when_invalid
};
protected override void Dispose(bool isDisposing)
{