mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:02:54 +08:00
Move quit colour change implementation to updateColour for better coverage
This commit is contained in:
parent
966a2151e3
commit
fa0576f47f
@ -231,15 +231,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
TotalScore.BindValueChanged(v => scoreText.Text = v.NewValue.ToString("N0"), true);
|
||||
Accuracy.BindValueChanged(v => accuracyText.Text = v.NewValue.FormatAccuracy(), true);
|
||||
Combo.BindValueChanged(v => comboText.Text = $"{v.NewValue}x", true);
|
||||
HasQuit.BindValueChanged(v =>
|
||||
{
|
||||
if (v.NewValue)
|
||||
{
|
||||
// we will probably want to display this in a better way once we have a design.
|
||||
// and also show states other than quit.
|
||||
panelColour = Color4.Gray;
|
||||
}
|
||||
}, true);
|
||||
HasQuit.BindValueChanged(v => updateColour());
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
@ -255,7 +247,14 @@ namespace osu.Game.Screens.Play.HUD
|
||||
private void updateColour()
|
||||
{
|
||||
if (HasQuit.Value)
|
||||
{
|
||||
// we will probably want to display this in a better way once we have a design.
|
||||
// and also show states other than quit.
|
||||
mainFillContainer.ResizeWidthTo(regular_width, panel_transition_duration, Easing.OutElastic);
|
||||
panelColour = Color4.Gray;
|
||||
textColour = Color4.White;
|
||||
return;
|
||||
}
|
||||
|
||||
if (scorePosition == 1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user