Fix TierColours assignment

This commit is contained in:
Dean Herbert 2023-01-17 18:07:11 +09:00
parent 65bd2e74fd
commit b62b5714e8
2 changed files with 8 additions and 9 deletions

View File

@ -48,17 +48,14 @@ namespace osu.Game.Graphics.UserInterface
}
}
private Colour4[] tierColours;
private IReadOnlyList<Colour4> tierColours;
public Colour4[] TierColours
public IReadOnlyList<Colour4> TierColours
{
get => tierColours;
set
{
if (value.Length == 0 || value == tierColours)
return;
tierCount = value.Length;
tierCount = value.Count;
tierColours = value;
graphNeedsUpdate = true;

View File

@ -53,10 +53,12 @@ namespace osu.Game.Screens.Play.HUD
public ArgonSongProgressGraph()
: base(5)
{
var colours = new List<Colour4>();
for (int i = 0; i < 5; i++)
{
TierColours[i] = Colour4.White.Opacity(1 / 5f * 0.85f);
}
colours.Add(Colour4.White.Opacity(1 / 5f * 0.85f));
TierColours = colours;
}
}
}