mirror of
https://github.com/ppy/osu
synced 2025-01-03 12:52:10 +00:00
Fix valueText
being replaced even if current is not binding to anything
This commit is contained in:
parent
4ddf05602f
commit
aab462fd95
@ -56,13 +56,8 @@ namespace osu.Game.Screens.Play.Break
|
||||
Colour = colours.YellowLight,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Current.BindValueChanged(text => valueText.Text = Format(text.NewValue), true);
|
||||
Current.BindValueChanged(text => valueText.Text = Format(text.NewValue));
|
||||
}
|
||||
|
||||
protected virtual LocalisableString Format(T count)
|
||||
|
@ -46,13 +46,14 @@ namespace osu.Game.Screens.Play
|
||||
private readonly Container remainingTimeBox;
|
||||
private readonly RemainingTimeCounter remainingTimeCounter;
|
||||
private readonly BreakArrows breakArrows;
|
||||
private readonly ScoreProcessor scoreProcessor;
|
||||
private readonly BreakInfo info;
|
||||
|
||||
public BreakOverlay(bool letterboxing, ScoreProcessor scoreProcessor)
|
||||
{
|
||||
this.scoreProcessor = scoreProcessor;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
BreakInfo info;
|
||||
|
||||
Child = fadeContainer = new Container
|
||||
{
|
||||
Alpha = 0,
|
||||
@ -102,18 +103,18 @@ namespace osu.Game.Screens.Play
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (scoreProcessor != null)
|
||||
{
|
||||
info.AccuracyDisplay.Current.BindTo(scoreProcessor.Accuracy);
|
||||
info.GradeDisplay.Current.BindTo(scoreProcessor.Rank);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
initializeBreaks();
|
||||
|
||||
if (scoreProcessor != null)
|
||||
{
|
||||
info.AccuracyDisplay.Current.BindTo(scoreProcessor.Accuracy);
|
||||
info.GradeDisplay.Current.BindTo(scoreProcessor.Rank);
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeBreaks()
|
||||
|
Loading…
Reference in New Issue
Block a user