mirror of
https://github.com/ppy/osu
synced 2025-01-23 14:22:51 +00:00
Fixed columns not being able to have zero fill
This commit is contained in:
parent
843b58c8f4
commit
0327c46d36
@ -41,7 +41,7 @@ namespace osu.Desktop.VisualTests
|
||||
List<int> newValues = new List<int>();
|
||||
for (int i = 0; i < 1000; i++)
|
||||
{
|
||||
newValues.Add(random.Next(1, 11));
|
||||
newValues.Add(random.Next(0, 11));
|
||||
}
|
||||
|
||||
progress.DisplayValues(newValues);
|
||||
|
@ -70,6 +70,9 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private void recalculateValues()
|
||||
{
|
||||
// Resizes values to fit the amount of columns and stores it in calculatedValues
|
||||
// Defaults to all zeros if values is null
|
||||
|
||||
calculatedValues.RemoveAll(delegate { return true; });
|
||||
|
||||
if (values == null)
|
||||
|
@ -59,7 +59,14 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
for (int i = 0; i < drawableRows.Count; i++)
|
||||
{
|
||||
drawableRows[i].Colour = i <= Filled ? colour : empty_colour;
|
||||
if (Filled == 0) // i <= Filled doesn't work for zero fill
|
||||
{
|
||||
drawableRows[i].Colour = empty_colour;
|
||||
}
|
||||
else
|
||||
{
|
||||
drawableRows[i].Colour = i <= Filled ? colour : empty_colour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user