mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Use GetLocalisedBindableString()
instead
This commit is contained in:
parent
fd6b3b6b36
commit
c185acdbae
@ -340,8 +340,6 @@ namespace osu.Game.Online.Chat
|
|||||||
Spectate,
|
Spectate,
|
||||||
OpenUserProfile,
|
OpenUserProfile,
|
||||||
SearchBeatmapSet,
|
SearchBeatmapSet,
|
||||||
SearchBeatmapTitle,
|
|
||||||
SearchBeatmapArtist,
|
|
||||||
OpenWiki,
|
OpenWiki,
|
||||||
Custom,
|
Custom,
|
||||||
OpenChangelog,
|
OpenChangelog,
|
||||||
|
@ -445,17 +445,15 @@ namespace osu.Game
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LinkAction.SearchBeatmapSet:
|
case LinkAction.SearchBeatmapSet:
|
||||||
|
if (link.Argument is LocalisableString localisable)
|
||||||
|
{
|
||||||
|
var localised = Localisation.GetLocalisedBindableString(localisable);
|
||||||
|
SearchBeatmapSet(localised.Value);
|
||||||
|
localised.UnbindAll();
|
||||||
|
}
|
||||||
|
else
|
||||||
SearchBeatmapSet(argString);
|
SearchBeatmapSet(argString);
|
||||||
break;
|
|
||||||
|
|
||||||
case LinkAction.SearchBeatmapTitle:
|
|
||||||
string title = ((RomanisableString)link.Argument).GetPreferred(Localisation.CurrentParameters.Value.PreferOriginalScript);
|
|
||||||
SearchBeatmapSet($@"title=""""{title}""""");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LinkAction.SearchBeatmapArtist:
|
|
||||||
string artist = ((RomanisableString)link.Argument).GetPreferred(Localisation.CurrentParameters.Value.PreferOriginalScript);
|
|
||||||
SearchBeatmapSet($@"artist=""""{artist}""""");
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LinkAction.FilterBeatmapSetGenre:
|
case LinkAction.FilterBeatmapSetGenre:
|
||||||
|
@ -242,7 +242,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
title.Clear();
|
title.Clear();
|
||||||
artist.Clear();
|
artist.Clear();
|
||||||
|
|
||||||
title.AddLink(titleText, LinkAction.SearchBeatmapTitle, titleText);
|
title.AddLink(titleText, LinkAction.SearchBeatmapSet, LocalisableString.Interpolate($@"title=""""{titleText}"""""));
|
||||||
|
|
||||||
title.AddArbitraryDrawable(Empty().With(d => d.Width = 5));
|
title.AddArbitraryDrawable(Empty().With(d => d.Width = 5));
|
||||||
title.AddArbitraryDrawable(externalLink = new ExternalLinkButton());
|
title.AddArbitraryDrawable(externalLink = new ExternalLinkButton());
|
||||||
@ -259,7 +259,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
title.AddArbitraryDrawable(new SpotlightBeatmapBadge());
|
title.AddArbitraryDrawable(new SpotlightBeatmapBadge());
|
||||||
}
|
}
|
||||||
|
|
||||||
artist.AddLink(artistText, LinkAction.SearchBeatmapArtist, artistText);
|
artist.AddLink(artistText, LinkAction.SearchBeatmapSet, LocalisableString.Interpolate($@"artist=""""{artistText}"""""));
|
||||||
|
|
||||||
if (setInfo.NewValue.TrackId != null)
|
if (setInfo.NewValue.TrackId != null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user