mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 19:23:21 +08: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,
|
Colour = colours.YellowLight,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
Current.BindValueChanged(text => valueText.Text = Format(text.NewValue));
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
Current.BindValueChanged(text => valueText.Text = Format(text.NewValue), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual LocalisableString Format(T count)
|
protected virtual LocalisableString Format(T count)
|
||||||
|
@ -46,13 +46,14 @@ namespace osu.Game.Screens.Play
|
|||||||
private readonly Container remainingTimeBox;
|
private readonly Container remainingTimeBox;
|
||||||
private readonly RemainingTimeCounter remainingTimeCounter;
|
private readonly RemainingTimeCounter remainingTimeCounter;
|
||||||
private readonly BreakArrows breakArrows;
|
private readonly BreakArrows breakArrows;
|
||||||
|
private readonly ScoreProcessor scoreProcessor;
|
||||||
|
private readonly BreakInfo info;
|
||||||
|
|
||||||
public BreakOverlay(bool letterboxing, ScoreProcessor scoreProcessor)
|
public BreakOverlay(bool letterboxing, ScoreProcessor scoreProcessor)
|
||||||
{
|
{
|
||||||
|
this.scoreProcessor = scoreProcessor;
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
BreakInfo info;
|
|
||||||
|
|
||||||
Child = fadeContainer = new Container
|
Child = fadeContainer = new Container
|
||||||
{
|
{
|
||||||
Alpha = 0,
|
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()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
initializeBreaks();
|
initializeBreaks();
|
||||||
|
|
||||||
|
if (scoreProcessor != null)
|
||||||
|
{
|
||||||
|
info.AccuracyDisplay.Current.BindTo(scoreProcessor.Accuracy);
|
||||||
|
info.GradeDisplay.Current.BindTo(scoreProcessor.Rank);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeBreaks()
|
private void initializeBreaks()
|
||||||
|
Loading…
Reference in New Issue
Block a user