1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:07:25 +08:00

Clear UR bar display on keyboard input

This commit is contained in:
sh0ckR6 2021-09-09 16:21:51 -04:00
parent 46599540b6
commit bf0150bab4
No known key found for this signature in database
GPG Key ID: 701938030071AF85

View File

@ -10,7 +10,9 @@ using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Bindings;
using osu.Game.Graphics;
using osu.Game.Input.Bindings;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
using osuTK;
@ -18,7 +20,7 @@ using osuTK.Graphics;
namespace osu.Game.Screens.Play.HUD.HitErrorMeters
{
public class BarHitErrorMeter : HitErrorMeter
public class BarHitErrorMeter : HitErrorMeter, IKeyBindingHandler<GlobalAction>
{
private const int arrow_move_duration = 400;
@ -279,5 +281,22 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
this.FadeTo(0.8f, 150).Then().FadeOut(judgement_fade_duration).Expire();
}
}
public bool OnPressed(GlobalAction action)
{
switch (action)
{
case GlobalAction.SeekReplayBackward:
case GlobalAction.SeekReplayForward:
judgementsContainer.Clear(true);
return false;
}
return false;
}
public void OnReleased(GlobalAction action)
{
}
}
}