mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 05:37:25 +08:00
Fix bottom timeline break visualisations not updating
This commit is contained in:
parent
814f1e552f
commit
f88f05717a
@ -2,9 +2,10 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
||||
{
|
||||
@ -20,11 +21,24 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
||||
Add(new BreakVisualisation(breakPeriod));
|
||||
}
|
||||
|
||||
private partial class BreakVisualisation : DurationVisualisation
|
||||
private partial class BreakVisualisation : Circle
|
||||
{
|
||||
private readonly BreakPeriod breakPeriod;
|
||||
|
||||
public BreakVisualisation(BreakPeriod breakPeriod)
|
||||
: base(breakPeriod.StartTime, breakPeriod.EndTime)
|
||||
{
|
||||
this.breakPeriod = breakPeriod;
|
||||
|
||||
RelativePositionAxes = Axes.X;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
X = (float)breakPeriod.StartTime;
|
||||
Width = (float)breakPeriod.Duration;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -1,23 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Visualisations
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a spanning point on a timeline part.
|
||||
/// </summary>
|
||||
public partial class DurationVisualisation : Circle
|
||||
{
|
||||
protected DurationVisualisation(double startTime, double endTime)
|
||||
{
|
||||
RelativePositionAxes = Axes.X;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
X = (float)startTime;
|
||||
Width = (float)(endTime - startTime);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user