1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 21:47:25 +08:00

Move zoom settings back to run in a non-loaded state

This commit is contained in:
Dean Herbert 2021-04-16 00:59:01 +09:00
parent 15d48a924b
commit c2340f1fe8

View File

@ -128,7 +128,21 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
});
waveformOpacity = config.GetBindable<float>(OsuSetting.EditorWaveformOpacity);
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()
@ -158,20 +172,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
mainContent.Delay(180).MoveToY(0, 200, Easing.OutQuint);
}
}, 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() =>