1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:32:55 +08:00

Pause Editor sample playback while popup dialog is shown

This commit is contained in:
Jamie Taylor 2021-09-29 20:29:27 +09:00
parent 909f8d1d98
commit 4d91204faf
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -508,6 +508,7 @@ namespace osu.Game.Screens.Edit
if (isNewBeatmap || HasUnsavedChanges)
{
samplePlaybackDisabled.Value = true;
dialogOverlay?.Push(new PromptForSaveDialog(confirmExit, confirmExitWithSave, cancelExit));
return true;
}
@ -756,7 +757,11 @@ namespace osu.Game.Screens.Edit
ClipboardContent = editorBeatmap.BeatmapInfo.RulesetID == nextBeatmap.RulesetID ? clipboard.Value : string.Empty
});
private void cancelExit() => loader?.CancelPendingDifficultySwitch();
private void cancelExit()
{
samplePlaybackDisabled.Value = false;
loader?.CancelPendingDifficultySwitch();
}
public double SnapTime(double time, double? referenceTime) => editorBeatmap.SnapTime(time, referenceTime);