1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 17:52:56 +08:00

Merge pull request #13637 from Game4all/localise-beatmap-listing-ruleset-filter

Localize beatmap listing ruleset filter `Any` button
This commit is contained in:
Dan Balasescu 2021-06-24 00:57:48 +09:00 committed by GitHub
commit 3a96f9bd14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
using osu.Game.Rulesets;
@ -22,14 +23,21 @@ namespace osu.Game.Overlays.BeatmapListing
[BackgroundDependencyLoader]
private void load(RulesetStore rulesets)
{
AddItem(new RulesetInfo
{
Name = @"Any"
});
AddTabItem(new RulesetFilterTabItemAny());
foreach (var r in rulesets.AvailableRulesets)
AddItem(r);
}
}
private class RulesetFilterTabItemAny : FilterTabItem<RulesetInfo>
{
protected override LocalisableString LabelFor(RulesetInfo info) => BeatmapsStrings.ModeAny;
public RulesetFilterTabItemAny()
: base(new RulesetInfo())
{
}
}
}
}