mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 16:12:54 +08:00
Move dialog strings to more common class name
This commit is contained in:
parent
e52f524ea2
commit
5dfeaa3c4a
@ -5,14 +5,14 @@ using osu.Framework.Localisation;
|
|||||||
|
|
||||||
namespace osu.Game.Localisation
|
namespace osu.Game.Localisation
|
||||||
{
|
{
|
||||||
public static class DeleteConfirmationDialogStrings
|
public static class DialogStrings
|
||||||
{
|
{
|
||||||
private const string prefix = @"osu.Game.Resources.Localisation.DeleteConfirmationDialog";
|
private const string prefix = @"osu.Game.Resources.Localisation.DialogStrings";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Caution"
|
/// "Caution"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString HeaderText => new TranslatableString(getKey(@"header_text"), @"Caution");
|
public static LocalisableString Caution => new TranslatableString(getKey(@"header_text"), @"Caution");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Yes. Go for it."
|
/// "Yes. Go for it."
|
@ -46,7 +46,7 @@ namespace osu.Game.Online.Chat
|
|||||||
{
|
{
|
||||||
public ExternalLinkDialog(string url, Action openExternalLinkAction, Action copyExternalLinkAction)
|
public ExternalLinkDialog(string url, Action openExternalLinkAction, Action copyExternalLinkAction)
|
||||||
{
|
{
|
||||||
HeaderText = DeleteConfirmationDialogStrings.HeaderText;
|
HeaderText = DialogStrings.Caution;
|
||||||
BodyText = $"Are you sure you want to open the following link in a web browser?\n\n{url}";
|
BodyText = $"Are you sure you want to open the following link in a web browser?\n\n{url}";
|
||||||
|
|
||||||
Icon = FontAwesome.Solid.ExclamationTriangle;
|
Icon = FontAwesome.Solid.ExclamationTriangle;
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
|
|
||||||
protected DangerousActionDialog()
|
protected DangerousActionDialog()
|
||||||
{
|
{
|
||||||
HeaderText = DeleteConfirmationDialogStrings.HeaderText;
|
HeaderText = DialogStrings.DialogCautionHeader;
|
||||||
|
|
||||||
Icon = FontAwesome.Regular.TrashAlt;
|
Icon = FontAwesome.Regular.TrashAlt;
|
||||||
|
|
||||||
@ -38,12 +38,12 @@ namespace osu.Game.Overlays.Dialog
|
|||||||
{
|
{
|
||||||
new PopupDialogDangerousButton
|
new PopupDialogDangerousButton
|
||||||
{
|
{
|
||||||
Text = DeleteConfirmationDialogStrings.Confirm,
|
Text = DialogStrings.DialogConfirm,
|
||||||
Action = () => DangerousAction?.Invoke()
|
Action = () => DangerousAction?.Invoke()
|
||||||
},
|
},
|
||||||
new PopupDialogCancelButton
|
new PopupDialogCancelButton
|
||||||
{
|
{
|
||||||
Text = DeleteConfirmationDialogStrings.Cancel,
|
Text = DialogStrings.Cancel,
|
||||||
Action = () => CancelAction?.Invoke()
|
Action = () => CancelAction?.Invoke()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user