Move copy toast to its own file

This commit is contained in:
ansel
2022-10-13 22:12:32 +03:00
parent 47d7d6fad9
commit e97dbf3dbc
2 changed files with 17 additions and 11 deletions

View File

@ -10,10 +10,8 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Localisation;
using osu.Framework.Platform;
using osu.Game.Overlays;
using osu.Game.Overlays.OSD;
using osuTK;
using osuTK.Graphics;
@ -94,15 +92,7 @@ namespace osu.Game.Graphics.UserInterface
private void copyUrl()
{
host.GetClipboard()?.SetText(Link);
onScreenDisplay?.Display(new CopyUrlToast(ToastStrings.UrlCopied));
}
private class CopyUrlToast : Toast
{
public CopyUrlToast(LocalisableString value)
: base(UserInterfaceStrings.GeneralHeader, value, "")
{
}
onScreenDisplay?.Display(new CopyUrlToast());
}
}
}