From 6e7691a52c94f55a70b11f15e0b17384c1497044 Mon Sep 17 00:00:00 2001 From: Eloise Date: Sun, 2 Feb 2025 19:32:53 +0000 Subject: [PATCH 1/2] Loop through colours to prevent crash in `StrainVisualizer` --- PerformanceCalculatorGUI/Components/StrainVisualizer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PerformanceCalculatorGUI/Components/StrainVisualizer.cs b/PerformanceCalculatorGUI/Components/StrainVisualizer.cs index 4b47fa8bf..c73656d97 100644 --- a/PerformanceCalculatorGUI/Components/StrainVisualizer.cs +++ b/PerformanceCalculatorGUI/Components/StrainVisualizer.cs @@ -111,7 +111,7 @@ private void updateGraphs(ValueChangedEvent val) Width = 200, Current = { BindTarget = graphToggleBindable, Default = true, Value = true }, LabelText = skills[i].GetType().Name, - TextColour = skillColours[i] + TextColour = skillColours[i % skillColours.Length] } } }); @@ -196,12 +196,12 @@ private void addStrainBars(Skill[] skills, List strainLists) { RelativeSizeAxes = Axes.Both, Alpha = graphAlpha, - Colour = skillColours[i], + Colour = skillColours[i % skillColours.Length], Child = new StrainBarGraph { RelativeSizeAxes = Axes.Both, MaxValue = strainMaxValue, - Values = strainLists[i] + Values = strainLists[i % skillColours.Length] } } }); From ad5b9c0d603fa6494caa6f9f31b402b7d4cc59ed Mon Sep 17 00:00:00 2001 From: Eloise Date: Sun, 2 Feb 2025 19:36:41 +0000 Subject: [PATCH 2/2] Remove unnecessary thing whooops --- PerformanceCalculatorGUI/Components/StrainVisualizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PerformanceCalculatorGUI/Components/StrainVisualizer.cs b/PerformanceCalculatorGUI/Components/StrainVisualizer.cs index c73656d97..62f84e4f8 100644 --- a/PerformanceCalculatorGUI/Components/StrainVisualizer.cs +++ b/PerformanceCalculatorGUI/Components/StrainVisualizer.cs @@ -201,7 +201,7 @@ private void addStrainBars(Skill[] skills, List strainLists) { RelativeSizeAxes = Axes.Both, MaxValue = strainMaxValue, - Values = strainLists[i % skillColours.Length] + Values = strainLists[i] } } });