1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 20:47:25 +08:00

Fixed setting column filled values not updating visually, added gray background to visual test

This commit is contained in:
DrabWeb 2017-02-09 18:56:50 -04:00
parent 4d7766b92b
commit ac6726ee2e
2 changed files with 12 additions and 3 deletions

View File

@ -22,6 +22,11 @@ namespace osu.Desktop.VisualTests
{
base.Reset();
Add(new Box
{
Colour = Color4.Gray,
RelativeSizeAxes = Axes.Both
});
Add(new SongProgress
{
Anchor = Anchor.BottomCentre,

View File

@ -32,6 +32,8 @@ namespace osu.Game.Screens.Play
{
if (value == filled) return;
filled = value;
fillActive();
}
}
@ -47,15 +49,17 @@ namespace osu.Game.Screens.Play
if (value == state) return;
state = value;
fillActive(value == ColumnState.Lit ? lit_colour : dimmed_colour);
fillActive();
}
}
private void fillActive(Color4 color)
private void fillActive()
{
Color4 colour = State == ColumnState.Lit ? lit_colour : dimmed_colour;
for (int i = 0; i < drawableRows.Count; i++)
{
drawableRows[i].Colour = i <= Filled ? color : empty_colour;
drawableRows[i].Colour = i <= Filled ? colour : empty_colour;
}
}