Change display to always show progress bar, only hiding seeking handle instead

This commit is contained in:
Dean Herbert
2020-01-24 14:21:22 +09:00
parent da65fff48e
commit 997b49f6dc
4 changed files with 29 additions and 6 deletions

View File

@ -46,7 +46,6 @@ namespace osu.Game.Screens.Play
public override bool HandlePositionalInput => AllowSeeking.Value;
private double firstHitTime => objects.First().StartTime;
private double lastHitTime => ((objects.Last() as IHasEndTime)?.EndTime ?? objects.Last().StartTime) + 1;
private IEnumerable<HitObject> objects;
@ -92,7 +91,6 @@ namespace osu.Game.Screens.Play
},
bar = new SongProgressBar(bottom_bar_height, graph_height, handle_size)
{
Alpha = 0,
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
OnSeek = time => RequestSeek?.Invoke(time),
@ -105,6 +103,9 @@ namespace osu.Game.Screens.Play
{
base.LoadComplete();
if (clock != null)
gameplayClock = clock;
config.BindWith(OsuSetting.ShowProgressGraph, ShowGraph);
graph.FillColour = bar.FillColour = colours.BlueLighter;
@ -151,8 +152,7 @@ namespace osu.Game.Screens.Play
private void updateBarVisibility()
{
bar.FadeTo(AllowSeeking.Value ? 1 : 0, transition_duration, Easing.In);
this.MoveTo(new Vector2(0, AllowSeeking.Value ? 0 : bottom_bar_height), transition_duration, Easing.In);
bar.ShowHandle = AllowSeeking.Value;
updateInfoMargin();
}