mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Remove BeatmapSearchSmallFilterRow component
This commit is contained in:
parent
474dae368f
commit
518acf03e9
@ -20,8 +20,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(BeatmapSearchFilterRow<>),
|
||||
typeof(BeatmapSearchRulesetFilterRow),
|
||||
typeof(BeatmapSearchSmallFilterRow<>),
|
||||
typeof(BeatmapSearchRulesetFilterRow)
|
||||
};
|
||||
|
||||
[Cached]
|
||||
@ -43,7 +42,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
new BeatmapSearchRulesetFilterRow(),
|
||||
new BeatmapSearchFilterRow<BeatmapSearchCategory>("Categories"),
|
||||
new BeatmapSearchSmallFilterRow<BeatmapSearchCategory>("Header Name")
|
||||
new BeatmapSearchFilterRow<BeatmapSearchCategory>("Header Name")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
private readonly BeatmapSearchTextBox textBox;
|
||||
private readonly BeatmapSearchRulesetFilterRow modeFilter;
|
||||
private readonly BeatmapSearchFilterRow<BeatmapSearchCategory> categoryFilter;
|
||||
private readonly BeatmapSearchSmallFilterRow<BeatmapSearchGenre> genreFilter;
|
||||
private readonly BeatmapSearchSmallFilterRow<BeatmapSearchLanguage> languageFilter;
|
||||
private readonly BeatmapSearchFilterRow<BeatmapSearchGenre> genreFilter;
|
||||
private readonly BeatmapSearchFilterRow<BeatmapSearchLanguage> languageFilter;
|
||||
|
||||
private readonly Box background;
|
||||
private readonly UpdateableBeatmapSetCover beatmapCover;
|
||||
@ -104,8 +104,8 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
{
|
||||
modeFilter = new BeatmapSearchRulesetFilterRow(),
|
||||
categoryFilter = new BeatmapSearchFilterRow<BeatmapSearchCategory>(@"Categories"),
|
||||
genreFilter = new BeatmapSearchSmallFilterRow<BeatmapSearchGenre>(@"Genre"),
|
||||
languageFilter = new BeatmapSearchSmallFilterRow<BeatmapSearchLanguage>(@"Language"),
|
||||
genreFilter = new BeatmapSearchFilterRow<BeatmapSearchGenre>(@"Genre"),
|
||||
languageFilter = new BeatmapSearchFilterRow<BeatmapSearchLanguage>(@"Language"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using Humanizer;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapListing
|
||||
{
|
||||
@ -55,8 +56,8 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
{
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
Font = OsuFont.GetFont(size: 10),
|
||||
Text = headerName.ToUpper()
|
||||
Font = OsuFont.GetFont(size: 13),
|
||||
Text = headerName.Titleize()
|
||||
},
|
||||
CreateFilter().With(f =>
|
||||
{
|
||||
|
@ -1,32 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Overlays.BeatmapListing
|
||||
{
|
||||
public class BeatmapSearchSmallFilterRow<T> : BeatmapSearchFilterRow<T>
|
||||
{
|
||||
public BeatmapSearchSmallFilterRow(string headerName)
|
||||
: base(headerName)
|
||||
{
|
||||
}
|
||||
|
||||
protected override BeatmapSearchFilter CreateFilter() => new SmallBeatmapSearchFilter();
|
||||
|
||||
private class SmallBeatmapSearchFilter : BeatmapSearchFilter
|
||||
{
|
||||
protected override TabItem<T> CreateTabItem(T value) => new SmallTabItem(value);
|
||||
|
||||
private class SmallTabItem : FilterTabItem
|
||||
{
|
||||
public SmallTabItem(T value)
|
||||
: base(value)
|
||||
{
|
||||
}
|
||||
|
||||
protected override float TextSize => 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user