2022-06-07 18:01:40 -04:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Game.Skinning;
|
|
|
|
|
using osu.Game.Overlays.Dialog;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Select
|
|
|
|
|
{
|
2024-10-07 16:44:10 +09:00
|
|
|
|
public partial class SkinDeleteDialog : DeletionDialog
|
2022-06-07 18:01:40 -04:00
|
|
|
|
{
|
2022-07-23 21:20:27 +02:00
|
|
|
|
private readonly Skin skin;
|
2022-06-07 18:01:40 -04:00
|
|
|
|
|
|
|
|
|
public SkinDeleteDialog(Skin skin)
|
|
|
|
|
{
|
2022-07-23 21:20:27 +02:00
|
|
|
|
this.skin = skin;
|
2022-06-08 18:10:41 +09:00
|
|
|
|
BodyText = skin.SkinInfo.Value.Name;
|
2022-07-23 21:20:27 +02:00
|
|
|
|
}
|
2022-06-08 17:57:59 +09:00
|
|
|
|
|
2022-07-23 21:20:27 +02:00
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(SkinManager manager)
|
|
|
|
|
{
|
2023-03-05 20:57:26 +01:00
|
|
|
|
DangerousAction = () =>
|
2022-07-23 21:20:27 +02:00
|
|
|
|
{
|
|
|
|
|
manager.Delete(skin.SkinInfo.Value);
|
|
|
|
|
manager.CurrentSkinInfo.SetDefault();
|
2022-06-08 18:10:41 +09:00
|
|
|
|
};
|
2022-06-07 18:01:40 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|