1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 15:42:55 +08:00

Fix accuracy heatmap points changing colour

This commit is contained in:
smoogipoo 2021-05-17 18:07:50 +09:00
parent de2900bc7c
commit 0989aa3364

View File

@ -166,7 +166,7 @@ namespace osu.Game.Rulesets.Osu.Statistics
var point = new HitPoint(pointType, this) var point = new HitPoint(pointType, this)
{ {
Colour = pointType == HitPointType.Hit ? new Color4(102, 255, 204, 255) : new Color4(255, 102, 102, 255) BaseColour = pointType == HitPointType.Hit ? new Color4(102, 255, 204, 255) : new Color4(255, 102, 102, 255)
}; };
points[r][c] = point; points[r][c] = point;
@ -234,6 +234,11 @@ namespace osu.Game.Rulesets.Osu.Statistics
private class HitPoint : Circle private class HitPoint : Circle
{ {
/// <summary>
/// The base colour which will be lightened/darkened depending on the value of this <see cref="HitPoint"/>.
/// </summary>
public Color4 BaseColour;
private readonly HitPointType pointType; private readonly HitPointType pointType;
private readonly AccuracyHeatmap heatmap; private readonly AccuracyHeatmap heatmap;
@ -284,7 +289,7 @@ namespace osu.Game.Rulesets.Osu.Statistics
Alpha = Math.Min(amount / lighten_cutoff, 1); Alpha = Math.Min(amount / lighten_cutoff, 1);
if (pointType == HitPointType.Hit) if (pointType == HitPointType.Hit)
Colour = ((Color4)Colour).Lighten(Math.Max(0, amount - lighten_cutoff)); Colour = BaseColour.Lighten(Math.Max(0, amount - lighten_cutoff));
} }
} }