1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Display "required save" popup when creating another difficulty on a new beatmap

This commit is contained in:
Salman Ahmed 2023-11-06 21:52:46 +03:00
parent 944fee56f8
commit b2749943e2

View File

@ -1095,6 +1095,19 @@ namespace osu.Game.Screens.Edit
protected void CreateNewDifficulty(RulesetInfo rulesetInfo) protected void CreateNewDifficulty(RulesetInfo rulesetInfo)
{ {
if (isNewBeatmap)
{
dialogOverlay.Push(new SaveRequiredPopupDialog("This beatmap will be saved in order to create another difficulty.", () =>
{
if (!Save())
return;
CreateNewDifficulty(rulesetInfo);
}));
return;
}
if (!rulesetInfo.Equals(editorBeatmap.BeatmapInfo.Ruleset)) if (!rulesetInfo.Equals(editorBeatmap.BeatmapInfo.Ruleset))
{ {
switchToNewDifficulty(rulesetInfo, false); switchToNewDifficulty(rulesetInfo, false);