mirror of
https://github.com/ppy/osu.git
synced 2025-02-28 04:03:06 +08:00
Merge pull request #12431 from peppy/fix-timeline-initial-seek
Fix timeline seeking to an incorrect initial location
This commit is contained in:
commit
a9d1d163bb
@ -65,6 +65,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
this.userContent = userContent;
|
this.userContent = userContent;
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
Height = timeline_height;
|
||||||
|
|
||||||
ZoomDuration = 200;
|
ZoomDuration = 200;
|
||||||
ZoomEasing = Easing.OutQuint;
|
ZoomEasing = Easing.OutQuint;
|
||||||
@ -127,7 +128,21 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
});
|
});
|
||||||
|
|
||||||
waveformOpacity = config.GetBindable<float>(OsuSetting.EditorWaveformOpacity);
|
waveformOpacity = config.GetBindable<float>(OsuSetting.EditorWaveformOpacity);
|
||||||
|
|
||||||
Beatmap.BindTo(beatmap);
|
Beatmap.BindTo(beatmap);
|
||||||
|
Beatmap.BindValueChanged(b =>
|
||||||
|
{
|
||||||
|
waveform.Waveform = b.NewValue.Waveform;
|
||||||
|
track = b.NewValue.Track;
|
||||||
|
|
||||||
|
// todo: i don't think this is safe, the track may not be loaded yet.
|
||||||
|
if (track.Length > 0)
|
||||||
|
{
|
||||||
|
MaxZoom = getZoomLevelForVisibleMilliseconds(500);
|
||||||
|
MinZoom = getZoomLevelForVisibleMilliseconds(10000);
|
||||||
|
Zoom = getZoomLevelForVisibleMilliseconds(2000);
|
||||||
|
}
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -157,20 +172,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
mainContent.Delay(180).MoveToY(0, 200, Easing.OutQuint);
|
mainContent.Delay(180).MoveToY(0, 200, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
Beatmap.BindValueChanged(b =>
|
|
||||||
{
|
|
||||||
waveform.Waveform = b.NewValue.Waveform;
|
|
||||||
track = b.NewValue.Track;
|
|
||||||
|
|
||||||
// todo: i don't think this is safe, the track may not be loaded yet.
|
|
||||||
if (track.Length > 0)
|
|
||||||
{
|
|
||||||
MaxZoom = getZoomLevelForVisibleMilliseconds(500);
|
|
||||||
MinZoom = getZoomLevelForVisibleMilliseconds(10000);
|
|
||||||
Zoom = getZoomLevelForVisibleMilliseconds(2000);
|
|
||||||
}
|
|
||||||
}, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateWaveformOpacity() =>
|
private void updateWaveformOpacity() =>
|
||||||
|
Loading…
Reference in New Issue
Block a user