mirror of
https://github.com/SK-la/Ez2Lazer.git
synced 2026-03-13 11:20:28 +00:00
Only show user tags above threshold by default
This commit is contained in:
@@ -131,7 +131,7 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
/// If <see langword="true"/>, only tags above <see cref="MINIMUM_USER_TAG_VOTES_FOR_DISPLAY"/> will be shown.
|
||||
/// If <see langword="false"/>, all tags regardless of vote count will be shown.
|
||||
/// </param>
|
||||
public (APITag Tag, int VoteCount)[] GetTopUserTags(bool confirmedOnly)
|
||||
public (APITag Tag, int VoteCount)[] GetTopUserTags(bool confirmedOnly = true)
|
||||
{
|
||||
if (TopTags == null || TopTags.Length == 0 || BeatmapSet?.RelatedTags == null)
|
||||
return [];
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
private void updateUserTags()
|
||||
{
|
||||
userTags.Metadata = Beatmap.Value?.GetTopUserTags(confirmedOnly: true).Select(t => t.Tag.Name).ToArray();
|
||||
userTags.Metadata = Beatmap.Value?.GetTopUserTags().Select(t => t.Tag.Name).ToArray();
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
||||
@@ -458,7 +458,7 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.Match.BeatmapSelect
|
||||
new OsuSpriteText
|
||||
{
|
||||
Padding = new MarginPadding { Vertical = 3, Horizontal = 8 },
|
||||
Text = beatmap.GetTopUserTags(confirmedOnly: true).FirstOrDefault().Tag?.Name ?? string.Empty,
|
||||
Text = beatmap.GetTopUserTags().FirstOrDefault().Tag?.Name ?? string.Empty,
|
||||
AlwaysPresent = true,
|
||||
Colour = colourProvider.Content2,
|
||||
Font = OsuFont.Style.Caption2,
|
||||
@@ -468,7 +468,7 @@ namespace osu.Game.Screens.OnlinePlay.Matchmaking.Match.BeatmapSelect
|
||||
};
|
||||
}
|
||||
|
||||
public LocalisableString TooltipText => string.Join('\n', beatmap.GetTopUserTags(confirmedOnly: false).Select(t => $"{t.Tag.Name} ({t.VoteCount})"));
|
||||
public LocalisableString TooltipText => string.Join('\n', beatmap.GetTopUserTags().Select(t => $"{t.Tag.Name} ({t.VoteCount})"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user