mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 16:03:01 +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);
|
TotalScore.BindValueChanged(v => scoreText.Text = v.NewValue.ToString("N0"), true);
|
||||||
Accuracy.BindValueChanged(v => accuracyText.Text = v.NewValue.FormatAccuracy(), true);
|
Accuracy.BindValueChanged(v => accuracyText.Text = v.NewValue.FormatAccuracy(), true);
|
||||||
Combo.BindValueChanged(v => comboText.Text = $"{v.NewValue}x", true);
|
Combo.BindValueChanged(v => comboText.Text = $"{v.NewValue}x", true);
|
||||||
HasQuit.BindValueChanged(v =>
|
HasQuit.BindValueChanged(v => updateColour());
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -255,7 +247,14 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
private void updateColour()
|
private void updateColour()
|
||||||
{
|
{
|
||||||
if (HasQuit.Value)
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (scorePosition == 1)
|
if (scorePosition == 1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user