1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-17 04:35:33 +08:00
osu-lazer/osu.Game/Overlays/Settings/Sections/Maintenance/StableDirectoryLocationDialog.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.5 KiB
C#
Raw Normal View History

2021-05-10 01:50:43 +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 System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Screens;
using osu.Game.Overlays.Dialog;
using osu.Game.Screens;
2021-05-10 01:50:43 +08:00
namespace osu.Game.Overlays.Settings.Sections.Maintenance
{
public partial class StableDirectoryLocationDialog : PopupDialog
{
[Resolved]
private IPerformFromScreenRunner performer { get; set; } = null!;
2021-05-10 01:50:43 +08:00
public StableDirectoryLocationDialog(TaskCompletionSource<string> taskCompletionSource)
{
HeaderText = "Failed to automatically locate an osu!stable installation.";
BodyText = "An existing install could not be located. If you know where it is, you can help locate it.";
2021-05-10 01:50:43 +08:00
Icon = FontAwesome.Solid.QuestionCircle;
Buttons = new PopupDialogButton[]
{
new PopupDialogOkButton
{
Text = "Sure! I know where it is located!",
Action = () => Schedule(() => performer.PerformFromScreen(screen => screen.Push(new StableDirectorySelectScreen(taskCompletionSource))))
2021-05-10 01:50:43 +08:00
},
new PopupDialogCancelButton
{
Text = "Actually I don't have osu!stable installed.",
Action = () => taskCompletionSource.TrySetCanceled()
}
};
}
}
}