From bf97f8b1b1edc3715bc428f862fcc621cbf6b228 Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sun, 3 Dec 2017 23:55:34 +0100 Subject: [PATCH] Added osu.ppy.sh/ss (screenshot) URL handling and calculate ID at assignment so it's not on click anymore --- osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs b/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs index 080f1c1f83..2199800d64 100644 --- a/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs +++ b/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs @@ -107,10 +107,13 @@ namespace osu.Game.Graphics.Sprites } url = url.Substring(osuUrlIndex + 11); + var id = getIdFromUrl(url); if (url.StartsWith("s/") || url.StartsWith("beatmapsets/") || url.StartsWith("d/")) - content.Action = () => beatmapSetOverlay.ShowBeatmapSet(getIdFromUrl(url)); + content.Action = () => beatmapSetOverlay.ShowBeatmapSet(id); else if (url.StartsWith("b/") || url.StartsWith("beatmaps/")) - content.Action = () => beatmapSetOverlay.ShowBeatmap(getIdFromUrl(url)); + content.Action = () => beatmapSetOverlay.ShowBeatmap(id); + else if (url.StartsWith("ss/")) + content.Action = () => Process.Start($"https://osu.ppy.sh/{url}"); } else content.Action = () => Process.Start(url);