refactor(osu.Game): separate OsuColour.ForHitResult by usage

This commit is contained in:
Acid Chicken (硫酸鶏)
2022-09-05 01:58:57 +09:00
parent cbc3627189
commit 5f0832ead7
5 changed files with 33 additions and 28 deletions

View File

@ -102,7 +102,7 @@ namespace osu.Game.Graphics
/// <summary>
/// Retrieves the colour for a <see cref="HitResult"/>.
/// </summary>
public Color4 ForHitResult(HitResult judgement)
public Color4 TextForHitResult(HitResult judgement)
{
switch (judgement)
{
@ -125,6 +125,34 @@ namespace osu.Game.Graphics
}
}
public Color4 DrawForHitResult(HitResult result)
{
switch (result)
{
case HitResult.SmallTickMiss:
case HitResult.LargeTickMiss:
case HitResult.Miss:
return Red;
case HitResult.Meh:
return Yellow;
case HitResult.Ok:
return Green;
case HitResult.Good:
return GreenLight;
case HitResult.SmallTickHit:
case HitResult.LargeTickHit:
case HitResult.Great:
return Blue;
default:
return BlueLight;
}
}
/// <summary>
/// Retrieves a colour for the given <see cref="BeatmapOnlineStatus"/>.
/// A <see langword="null"/> value indicates that a "background" shade from the local <see cref="OverlayColourProvider"/>