2019-12-19 11:22:42 +08: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.Overlays.Dialog;
|
|
|
|
using osu.Game.Scoring;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Select
|
|
|
|
{
|
2024-10-07 15:44:10 +08:00
|
|
|
public partial class LocalScoreDeleteDialog : DeletionDialog
|
2019-12-19 11:22:42 +08:00
|
|
|
{
|
2020-01-06 16:32:24 +08:00
|
|
|
private readonly ScoreInfo score;
|
|
|
|
|
2019-12-19 11:26:35 +08:00
|
|
|
public LocalScoreDeleteDialog(ScoreInfo score)
|
2019-12-19 11:22:42 +08:00
|
|
|
{
|
2020-01-06 16:32:24 +08:00
|
|
|
this.score = score;
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2023-07-04 13:50:34 +08:00
|
|
|
private void load(ScoreManager scoreManager)
|
2020-01-06 16:32:24 +08:00
|
|
|
{
|
2020-02-03 23:11:36 +08:00
|
|
|
BodyText = $"{score.User} ({score.DisplayAccuracy}, {score.Rank})";
|
2023-03-06 03:57:26 +08:00
|
|
|
DangerousAction = () => scoreManager.Delete(score);
|
2019-12-19 11:22:42 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|