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

Clear UR bar display on seek with mouse

This commit is contained in:
sh0ckR6 2021-09-09 20:08:16 -04:00
parent bf0150bab4
commit bde092f816
No known key found for this signature in database
GPG Key ID: 701938030071AF85
2 changed files with 13 additions and 1 deletions

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Bindings;
using osu.Framework.Testing;
using osu.Game.Graphics;
using osu.Game.Input.Bindings;
using osu.Game.Rulesets.Judgements;
@ -143,6 +144,10 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
arrow.Alpha = 0;
arrow.Delay(200).FadeInFromZero(600);
var progressBar = Parent.ChildrenOfType<SongProgress>().FirstOrDefault();
if (progressBar != null)
progressBar.Bar.OnSeek += _ => handleSeek();
}
private void createColourBars(OsuColour colours)
@ -282,13 +287,18 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
}
}
private void handleSeek()
{
judgementsContainer.Clear(true);
}
public bool OnPressed(GlobalAction action)
{
switch (action)
{
case GlobalAction.SeekReplayBackward:
case GlobalAction.SeekReplayForward:
judgementsContainer.Clear(true);
handleSeek();
return false;
}

View File

@ -35,6 +35,8 @@ namespace osu.Game.Screens.Play
private readonly SongProgressGraph graph;
private readonly SongProgressInfo info;
public SongProgressBar Bar => bar;
public Action<double> RequestSeek;
/// <summary>