1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 00:43:25 +08:00

Further metrics tweaking

This commit is contained in:
Dean Herbert 2022-03-14 19:27:53 +09:00
parent e91b3ae5f1
commit 163cd48bf6

View File

@ -18,8 +18,8 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
{ {
public class BarHitErrorMeter : HitErrorMeter public class BarHitErrorMeter : HitErrorMeter
{ {
private const int judgement_line_width = 10; private const int judgement_line_width = 14;
private const int judgement_line_height = 3; private const int judgement_line_height = 4;
private SpriteIcon arrow; private SpriteIcon arrow;
private SpriteIcon iconEarly; private SpriteIcon iconEarly;
@ -40,7 +40,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
const int centre_marker_size = 6; const int centre_marker_size = 8;
const int bar_height = 200; const int bar_height = 200;
const int bar_width = 2; const int bar_width = 2;
const float chevron_size = 8; const float chevron_size = 8;
@ -98,6 +98,14 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Height = 0.5f, Height = 0.5f,
}, },
new Circle
{
Name = "middle marker behind",
Colour = GetColourForHitResult(hitWindows.Last().result),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(centre_marker_size),
},
judgementsContainer = new Container judgementsContainer = new Container
{ {
Name = "judgements", Name = "judgements",
@ -107,17 +115,9 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
Width = judgement_line_width, Width = judgement_line_width,
}, },
new Circle new Circle
{
Name = "middle marker behind",
Colour = GetColourForHitResult(hitWindows.Last().result),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(centre_marker_size),
},
new Circle
{ {
Name = "middle marker in front", Name = "middle marker in front",
Colour = GetColourForHitResult(hitWindows.Last().result).Darken(0.5f), Colour = GetColourForHitResult(hitWindows.Last().result).Darken(0.3f),
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
Size = new Vector2(centre_marker_size), Size = new Vector2(centre_marker_size),
@ -231,7 +231,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
protected override void OnNewJudgement(JudgementResult judgement) protected override void OnNewJudgement(JudgementResult judgement)
{ {
const int arrow_move_duration = 400; const int arrow_move_duration = 800;
if (!judgement.IsHit || judgement.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0) if (!judgement.IsHit || judgement.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0)
return; return;
@ -261,7 +261,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
arrow.MoveToY( arrow.MoveToY(
getRelativeJudgementPosition(floatingAverage = floatingAverage * 0.9 + judgement.TimeOffset * 0.1) getRelativeJudgementPosition(floatingAverage = floatingAverage * 0.9 + judgement.TimeOffset * 0.1)
, arrow_move_duration, Easing.Out); , arrow_move_duration, Easing.OutQuint);
} }
private float getRelativeJudgementPosition(double value) => Math.Clamp((float)((value / maxHitWindow) + 1) / 2, 0, 1); private float getRelativeJudgementPosition(double value) => Math.Clamp((float)((value / maxHitWindow) + 1) / 2, 0, 1);
@ -296,11 +296,11 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
Width = 0; Width = 0;
this this
.FadeTo(0.8f, judgement_fade_in_duration, Easing.OutQuint) .FadeTo(0.6f, judgement_fade_in_duration, Easing.OutQuint)
.ResizeWidthTo(1, judgement_fade_in_duration, Easing.OutQuint) .ResizeWidthTo(1, judgement_fade_in_duration, Easing.OutQuint)
.Then() .Then()
.FadeOut(judgement_fade_out_duration, Easing.In) .FadeOut(judgement_fade_out_duration)
.ResizeWidthTo(0, judgement_fade_out_duration, Easing.In) .ResizeWidthTo(0, judgement_fade_out_duration, Easing.InQuint)
.Expire(); .Expire();
} }
} }