From b62b5714e89199159341757688bd5abe01b008ea Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 17 Jan 2023 18:07:11 +0900 Subject: [PATCH] Fix `TierColours` assignment --- osu.Game/Graphics/UserInterface/SegmentedGraph.cs | 9 +++------ osu.Game/Screens/Play/HUD/ArgonSongProgressGraph.cs | 8 +++++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/SegmentedGraph.cs b/osu.Game/Graphics/UserInterface/SegmentedGraph.cs index 8ccba710b8..dab7ec0559 100644 --- a/osu.Game/Graphics/UserInterface/SegmentedGraph.cs +++ b/osu.Game/Graphics/UserInterface/SegmentedGraph.cs @@ -48,17 +48,14 @@ namespace osu.Game.Graphics.UserInterface } } - private Colour4[] tierColours; + private IReadOnlyList tierColours; - public Colour4[] TierColours + public IReadOnlyList TierColours { get => tierColours; set { - if (value.Length == 0 || value == tierColours) - return; - - tierCount = value.Length; + tierCount = value.Count; tierColours = value; graphNeedsUpdate = true; diff --git a/osu.Game/Screens/Play/HUD/ArgonSongProgressGraph.cs b/osu.Game/Screens/Play/HUD/ArgonSongProgressGraph.cs index 2c82faf7b2..577d79886c 100644 --- a/osu.Game/Screens/Play/HUD/ArgonSongProgressGraph.cs +++ b/osu.Game/Screens/Play/HUD/ArgonSongProgressGraph.cs @@ -53,10 +53,12 @@ namespace osu.Game.Screens.Play.HUD public ArgonSongProgressGraph() : base(5) { + var colours = new List(); + 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; } } }