From b7d2821b5514f0b3e4b76064696354a0f56ae48a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 14 Apr 2021 14:51:52 +0900 Subject: [PATCH] Display the centre marker above the waveform Gives it a bit more visibility. This is where it was meant to sit, but didn't consider using a proxy drawable to make it work previously. --- .../Edit/Compose/Components/Timeline/Timeline.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs b/osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs index 86a30b7e2d..aa5cc46e37 100644 --- a/osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs +++ b/osu.Game/Screens/Edit/Compose/Components/Timeline/Timeline.cs @@ -74,13 +74,18 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline [BackgroundDependencyLoader] private void load(IBindable beatmap, OsuColour colours, OsuConfigManager config) { + CentreMarker centreMarker; + + // We don't want the centre marker to scroll + AddInternal(centreMarker = new CentreMarker()); + AddRange(new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Depth = float.MaxValue, - Children = new Drawable[] + Children = new[] { waveform = new WaveformGraph { @@ -90,6 +95,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline MidColour = colours.BlueDark, HighColour = colours.BlueDarker, }, + centreMarker.CreateProxy(), ticks = new TimelineTickDisplay(), controlPoints = new TimelineControlPointDisplay(), new Box @@ -104,9 +110,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline }, }); - // We don't want the centre marker to scroll - AddInternal(new CentreMarker { Depth = float.MaxValue }); - waveformOpacity = config.GetBindable(OsuSetting.EditorWaveformOpacity); waveformOpacity.BindValueChanged(_ => updateWaveformOpacity(), true);