mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 19:12:57 +08:00
Always show timing points in timeline when at the timing screen
Supersedes https://github.com/ppy/osu/pull/29196.
This commit is contained in:
parent
e329427d6e
commit
2d52bab77b
@ -28,6 +28,21 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
|
||||
private readonly Drawable userContent;
|
||||
|
||||
private bool alwaysShowControlPoints;
|
||||
|
||||
public bool AlwaysShowControlPoints
|
||||
{
|
||||
get => alwaysShowControlPoints;
|
||||
set
|
||||
{
|
||||
if (value == alwaysShowControlPoints)
|
||||
return;
|
||||
|
||||
alwaysShowControlPoints = value;
|
||||
controlPointsVisible.TriggerChange();
|
||||
}
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private EditorClock editorClock { get; set; } = null!;
|
||||
|
||||
@ -176,7 +191,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
|
||||
controlPointsVisible.BindValueChanged(visible =>
|
||||
{
|
||||
if (visible.NewValue)
|
||||
if (visible.NewValue || alwaysShowControlPoints)
|
||||
{
|
||||
this.ResizeHeightTo(timeline_expanded_height, 200, Easing.OutQuint);
|
||||
mainContent.MoveToY(15, 200, Easing.OutQuint);
|
||||
|
@ -5,7 +5,6 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
@ -26,7 +25,7 @@ namespace osu.Game.Screens.Edit
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
private void load()
|
||||
{
|
||||
// Grid with only two rows.
|
||||
// First is the timeline area, which should be allowed to expand as required.
|
||||
@ -107,8 +106,16 @@ namespace osu.Game.Screens.Edit
|
||||
MainContent.Add(content);
|
||||
content.FadeInFromZero(300, Easing.OutQuint);
|
||||
|
||||
LoadComponentAsync(TimelineArea = new TimelineArea(CreateTimelineContent()), timelineContent.Add);
|
||||
LoadComponentAsync(TimelineArea = new TimelineArea(CreateTimelineContent()), timeline =>
|
||||
{
|
||||
ConfigureTimeline(timeline);
|
||||
timelineContent.Add(timeline);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
protected virtual void ConfigureTimeline(TimelineArea timelineArea)
|
||||
{
|
||||
}
|
||||
|
||||
protected abstract Drawable CreateMainContent();
|
||||
|
@ -6,6 +6,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Timing
|
||||
{
|
||||
@ -53,5 +54,12 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
SelectedGroup.Value = EditorBeatmap.ControlPointInfo.GroupAt(nearestTimingPoint.Time);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ConfigureTimeline(TimelineArea timelineArea)
|
||||
{
|
||||
base.ConfigureTimeline(timelineArea);
|
||||
|
||||
timelineArea.Timeline.AlwaysShowControlPoints = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user