mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 05:52:55 +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 readonly Drawable userContent;
|
||||||
|
|
||||||
|
private bool alwaysShowControlPoints;
|
||||||
|
|
||||||
|
public bool AlwaysShowControlPoints
|
||||||
|
{
|
||||||
|
get => alwaysShowControlPoints;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == alwaysShowControlPoints)
|
||||||
|
return;
|
||||||
|
|
||||||
|
alwaysShowControlPoints = value;
|
||||||
|
controlPointsVisible.TriggerChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private EditorClock editorClock { get; set; } = null!;
|
private EditorClock editorClock { get; set; } = null!;
|
||||||
|
|
||||||
@ -176,7 +191,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
|
|
||||||
controlPointsVisible.BindValueChanged(visible =>
|
controlPointsVisible.BindValueChanged(visible =>
|
||||||
{
|
{
|
||||||
if (visible.NewValue)
|
if (visible.NewValue || alwaysShowControlPoints)
|
||||||
{
|
{
|
||||||
this.ResizeHeightTo(timeline_expanded_height, 200, Easing.OutQuint);
|
this.ResizeHeightTo(timeline_expanded_height, 200, Easing.OutQuint);
|
||||||
mainContent.MoveToY(15, 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;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Overlays;
|
|
||||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit
|
namespace osu.Game.Screens.Edit
|
||||||
@ -26,7 +25,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OverlayColourProvider colourProvider)
|
private void load()
|
||||||
{
|
{
|
||||||
// Grid with only two rows.
|
// Grid with only two rows.
|
||||||
// First is the timeline area, which should be allowed to expand as required.
|
// 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);
|
MainContent.Add(content);
|
||||||
content.FadeInFromZero(300, Easing.OutQuint);
|
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();
|
protected abstract Drawable CreateMainContent();
|
||||||
|
@ -6,6 +6,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
|
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Timing
|
namespace osu.Game.Screens.Edit.Timing
|
||||||
{
|
{
|
||||||
@ -53,5 +54,12 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
SelectedGroup.Value = EditorBeatmap.ControlPointInfo.GroupAt(nearestTimingPoint.Time);
|
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