mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 00:02:54 +08:00
Fix incorrect song select matching label by showing both beatmap and difficulty count for less ambiguity
This commit is contained in:
parent
76a6f97fbb
commit
8b30c67580
@ -64,7 +64,12 @@ namespace osu.Game.Screens.Select
|
||||
/// <summary>
|
||||
/// The total count of non-filtered beatmaps displayed.
|
||||
/// </summary>
|
||||
public int CountDisplayed => beatmapSets.Where(s => !s.Filtered.Value).Sum(s => s.Beatmaps.Count(b => !b.Filtered.Value));
|
||||
public int CountDisplayedBeatmaps => beatmapSets.Where(s => !s.Filtered.Value).Sum(s => s.Beatmaps.Count(b => !b.Filtered.Value));
|
||||
|
||||
/// <summary>
|
||||
/// The total count of non-filtered beatmap sets displayed.
|
||||
/// </summary>
|
||||
public int CountDisplayedSets => beatmapSets.Count(s => !s.Filtered.Value);
|
||||
|
||||
/// <summary>
|
||||
/// The currently selected beatmap set.
|
||||
|
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
@ -861,11 +862,9 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private void updateVisibleBeatmapCount()
|
||||
{
|
||||
FilterControl.InformationalText = Carousel.CountDisplayed == 1
|
||||
// Intentionally not localised until we have proper support for this (see https://github.com/ppy/osu-framework/pull/4918
|
||||
// but also in this case we want support for formatting a number within a string).
|
||||
? $"{Carousel.CountDisplayed:#,0} matching beatmap"
|
||||
: $"{Carousel.CountDisplayed:#,0} matching beatmaps";
|
||||
// Intentionally not localised until we have proper support for this (see https://github.com/ppy/osu-framework/pull/4918
|
||||
// but also in this case we want support for formatting a number within a string).
|
||||
FilterControl.InformationalText = $"{"matching beatmap".ToQuantity(Carousel.CountDisplayedSets, "#,0")} ({"difficulty".ToQuantity(Carousel.CountDisplayedBeatmaps, "#,0")})";
|
||||
}
|
||||
|
||||
private bool boundLocalBindables;
|
||||
|
Loading…
Reference in New Issue
Block a user