2019-01-24 08:43:03 +00: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.
|
2018-10-22 20:16:57 +00:00
|
|
|
|
|
|
|
|
|
using System;
|
2019-03-27 10:29:27 +00:00
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
2018-10-22 20:16:57 +00:00
|
|
|
|
using osu.Game.Overlays.Dialog;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Chat
|
|
|
|
|
{
|
|
|
|
|
public class ExternalLinkDialog : PopupDialog
|
|
|
|
|
{
|
|
|
|
|
public ExternalLinkDialog(string url, Action openExternalLinkAction)
|
|
|
|
|
{
|
2018-11-23 06:19:15 +00:00
|
|
|
|
HeaderText = "Just checking...";
|
|
|
|
|
BodyText = $"You are about to leave osu! and open the following link in a web browser:\n\n{url}";
|
2018-10-22 20:16:57 +00:00
|
|
|
|
|
2019-04-02 10:55:24 +00:00
|
|
|
|
Icon = FontAwesome.Solid.ExclamationTriangle;
|
2018-11-23 06:19:15 +00:00
|
|
|
|
|
2018-10-22 20:16:57 +00:00
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
|
|
|
{
|
|
|
|
|
new PopupDialogOkButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"Yes. Go for it.",
|
|
|
|
|
Action = openExternalLinkAction
|
|
|
|
|
},
|
|
|
|
|
new PopupDialogCancelButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"No! Abort mission!"
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|