1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 16:27:20 +08:00

Fix ShowMaxJudgement callback conflicting with JudgementCounter.Pop{In,Out}

Both `JudgementCounterDisplay` (via the `ShowMaxJudgement` callback)
and the `JudgementCounter.Pop{In,Out}` methods were operating on the
alpha of the `JudgementCounter`. This meant that if the counter display
was created with max judgement initially hidden, it would be hidden
by the `ShowMaxJudgement` callback first, but then _unhidden_
by `PopIn()`.
This commit is contained in:
Bartłomiej Dach 2023-01-18 21:46:28 +01:00
parent 7299d227d1
commit 769f8c6190
No known key found for this signature in database

View File

@ -68,10 +68,12 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
Mode.BindValueChanged(_ => updateMode(), true);
ShowMaxJudgement.BindValueChanged(value =>
ShowMaxJudgement.BindValueChanged(showMax =>
{
var firstChild = CounterFlow.Children.FirstOrDefault();
firstChild.FadeTo(value.NewValue ? 1 : 0, TRANSFORM_DURATION, Easing.OutQuint);
if (firstChild != null)
firstChild.State.Value = showMax.NewValue ? Visibility.Visible : Visibility.Hidden;
}, true);
}