split save logic

This commit is contained in:
cdwcgt
2023-03-09 22:23:13 +09:00
parent 54564e0557
commit 5a1316f0e5
2 changed files with 16 additions and 6 deletions

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
@ -108,13 +107,10 @@ namespace osu.Game.Overlays.Mods
private void trySaveCurrentMod()
{
if (button.Active.Value || !selectedMods.Value.Any())
if (button.SaveCurrentMod())
return;
button.Preset.PerformWrite(s =>
{
s.Mods = selectedMods.Value.ToArray();
});
Body.Shake();
}
protected override void LoadComplete()