mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00: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[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
typeof(BeatmapSearchFilterRow<>),
|
typeof(BeatmapSearchFilterRow<>),
|
||||||
typeof(BeatmapSearchRulesetFilterRow),
|
typeof(BeatmapSearchRulesetFilterRow)
|
||||||
typeof(BeatmapSearchSmallFilterRow<>),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
@ -43,7 +42,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
{
|
{
|
||||||
new BeatmapSearchRulesetFilterRow(),
|
new BeatmapSearchRulesetFilterRow(),
|
||||||
new BeatmapSearchFilterRow<BeatmapSearchCategory>("Categories"),
|
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 BeatmapSearchTextBox textBox;
|
||||||
private readonly BeatmapSearchRulesetFilterRow modeFilter;
|
private readonly BeatmapSearchRulesetFilterRow modeFilter;
|
||||||
private readonly BeatmapSearchFilterRow<BeatmapSearchCategory> categoryFilter;
|
private readonly BeatmapSearchFilterRow<BeatmapSearchCategory> categoryFilter;
|
||||||
private readonly BeatmapSearchSmallFilterRow<BeatmapSearchGenre> genreFilter;
|
private readonly BeatmapSearchFilterRow<BeatmapSearchGenre> genreFilter;
|
||||||
private readonly BeatmapSearchSmallFilterRow<BeatmapSearchLanguage> languageFilter;
|
private readonly BeatmapSearchFilterRow<BeatmapSearchLanguage> languageFilter;
|
||||||
|
|
||||||
private readonly Box background;
|
private readonly Box background;
|
||||||
private readonly UpdateableBeatmapSetCover beatmapCover;
|
private readonly UpdateableBeatmapSetCover beatmapCover;
|
||||||
@ -104,8 +104,8 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
{
|
{
|
||||||
modeFilter = new BeatmapSearchRulesetFilterRow(),
|
modeFilter = new BeatmapSearchRulesetFilterRow(),
|
||||||
categoryFilter = new BeatmapSearchFilterRow<BeatmapSearchCategory>(@"Categories"),
|
categoryFilter = new BeatmapSearchFilterRow<BeatmapSearchCategory>(@"Categories"),
|
||||||
genreFilter = new BeatmapSearchSmallFilterRow<BeatmapSearchGenre>(@"Genre"),
|
genreFilter = new BeatmapSearchFilterRow<BeatmapSearchGenre>(@"Genre"),
|
||||||
languageFilter = new BeatmapSearchSmallFilterRow<BeatmapSearchLanguage>(@"Language"),
|
languageFilter = new BeatmapSearchFilterRow<BeatmapSearchLanguage>(@"Language"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
using Humanizer;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.BeatmapListing
|
namespace osu.Game.Overlays.BeatmapListing
|
||||||
{
|
{
|
||||||
@ -55,8 +56,8 @@ namespace osu.Game.Overlays.BeatmapListing
|
|||||||
{
|
{
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Font = OsuFont.GetFont(size: 10),
|
Font = OsuFont.GetFont(size: 13),
|
||||||
Text = headerName.ToUpper()
|
Text = headerName.Titleize()
|
||||||
},
|
},
|
||||||
CreateFilter().With(f =>
|
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