mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Reorder file content to match expectations
This commit is contained in:
@ -48,28 +48,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyUrl()
|
|
||||||
{
|
|
||||||
host.GetClipboard()?.SetText(Link);
|
|
||||||
onScreenDisplay?.Display(new CopyUrlToast(ToastStrings.UrlCopied));
|
|
||||||
}
|
|
||||||
|
|
||||||
public MenuItem[] ContextMenuItems
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
List<MenuItem> items = new List<MenuItem>();
|
|
||||||
|
|
||||||
if (Link != null)
|
|
||||||
{
|
|
||||||
items.Add(new OsuMenuItem("Open", MenuItemType.Standard, () => host.OpenUrlExternally(Link)));
|
|
||||||
items.Add(new OsuMenuItem("Copy URL", MenuItemType.Standard, copyUrl));
|
|
||||||
}
|
|
||||||
|
|
||||||
return items.ToArray();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
@ -97,6 +75,28 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
public LocalisableString TooltipText => "view in browser";
|
public LocalisableString TooltipText => "view in browser";
|
||||||
|
|
||||||
|
public MenuItem[] ContextMenuItems
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
List<MenuItem> items = new List<MenuItem>();
|
||||||
|
|
||||||
|
if (Link != null)
|
||||||
|
{
|
||||||
|
items.Add(new OsuMenuItem("Open", MenuItemType.Standard, () => host.OpenUrlExternally(Link)));
|
||||||
|
items.Add(new OsuMenuItem("Copy URL", MenuItemType.Standard, copyUrl));
|
||||||
|
}
|
||||||
|
|
||||||
|
return items.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void copyUrl()
|
||||||
|
{
|
||||||
|
host.GetClipboard()?.SetText(Link);
|
||||||
|
onScreenDisplay?.Display(new CopyUrlToast(ToastStrings.UrlCopied));
|
||||||
|
}
|
||||||
|
|
||||||
private class CopyUrlToast : Toast
|
private class CopyUrlToast : Toast
|
||||||
{
|
{
|
||||||
public CopyUrlToast(LocalisableString value)
|
public CopyUrlToast(LocalisableString value)
|
||||||
|
Reference in New Issue
Block a user