mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 05:02:56 +08:00
34 lines
1003 B
C#
34 lines
1003 B
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using System;
|
|
using osu.Game.Graphics;
|
|
using osu.Game.Overlays.Dialog;
|
|
|
|
namespace osu.Game.Overlays.Chat
|
|
{
|
|
public class ExternalLinkDialog : PopupDialog
|
|
{
|
|
public ExternalLinkDialog(string url, Action openExternalLinkAction)
|
|
{
|
|
HeaderText = "Just checking...";
|
|
BodyText = $"You are about to leave osu! and open the following link in a web browser:\n\n{url}";
|
|
|
|
Icon = FontAwesome.fa_warning;
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
{
|
|
new PopupDialogOkButton
|
|
{
|
|
Text = @"Yes. Go for it.",
|
|
Action = openExternalLinkAction
|
|
},
|
|
new PopupDialogCancelButton
|
|
{
|
|
Text = @"No! Abort mission!"
|
|
},
|
|
};
|
|
}
|
|
}
|
|
}
|