mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge pull request #7644 from peppy/standardise-zoom-levels
Standardise editor timeline zoom across maps of all lengths
This commit is contained in:
@ -30,10 +30,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
{
|
||||
ZoomDuration = 200;
|
||||
ZoomEasing = Easing.OutQuint;
|
||||
|
||||
Zoom = 60;
|
||||
MaxZoom = 240;
|
||||
|
||||
ScrollbarVisible = false;
|
||||
}
|
||||
|
||||
@ -64,9 +60,15 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
{
|
||||
waveform.Waveform = b.NewValue.Waveform;
|
||||
track = b.NewValue.Track;
|
||||
|
||||
MinZoom = getZoomLevelForVisibleMilliseconds(10000);
|
||||
MaxZoom = getZoomLevelForVisibleMilliseconds(500);
|
||||
Zoom = getZoomLevelForVisibleMilliseconds(2000);
|
||||
}, true);
|
||||
}
|
||||
|
||||
private float getZoomLevelForVisibleMilliseconds(double milliseconds) => (float)(track.Length / milliseconds);
|
||||
|
||||
/// <summary>
|
||||
/// The timeline's scroll position in the last frame.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user