mirror of
https://github.com/ppy/osu.git
synced 2024-11-12 00:27:25 +08:00
Fixed setting column filled values not updating visually, added gray background to visual test
This commit is contained in:
parent
4d7766b92b
commit
ac6726ee2e
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user