mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Restore editor clock time after difficulty switch
This commit is contained in:
@ -20,6 +20,13 @@ namespace osu.Game.Screens.Edit
|
||||
/// </summary>
|
||||
public class EditorLoader : ScreenWithBeatmapBackground
|
||||
{
|
||||
/// <summary>
|
||||
/// The stored state from the last editor opened.
|
||||
/// This will be read by the next editor instance to be opened to restore any relevant previous state.
|
||||
/// </summary>
|
||||
[CanBeNull]
|
||||
public EditorState State;
|
||||
|
||||
public override float BackgroundParallaxAmount => 0.1f;
|
||||
|
||||
public override bool AllowBackButton => false;
|
||||
@ -61,7 +68,7 @@ namespace osu.Game.Screens.Edit
|
||||
}
|
||||
}
|
||||
|
||||
public void ScheduleDifficultySwitch(BeatmapInfo beatmapInfo)
|
||||
public void ScheduleDifficultySwitch(BeatmapInfo nextBeatmap, EditorState editorState)
|
||||
{
|
||||
scheduledDifficultySwitch?.Cancel();
|
||||
ValidForResume = true;
|
||||
@ -70,7 +77,8 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
scheduledDifficultySwitch = Schedule(() =>
|
||||
{
|
||||
Beatmap.Value = beatmapManager.GetWorkingBeatmap(beatmapInfo);
|
||||
Beatmap.Value = beatmapManager.GetWorkingBeatmap(nextBeatmap);
|
||||
State = editorState;
|
||||
|
||||
// This screen is a weird exception to the rule that nothing after song select changes the global beatmap.
|
||||
// Because of this, we need to update the background stack's beatmap to match.
|
||||
|
Reference in New Issue
Block a user