mirror of
https://github.com/ppy/osu
synced 2025-02-08 22:27:14 +00:00
Move beatmap listing filter control to header
This commit is contained in:
parent
7c1ccefa4a
commit
e1fb63e1f3
@ -3,6 +3,7 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
|
||||
@ -10,8 +11,12 @@ namespace osu.Game.Overlays.BeatmapListing
|
||||
{
|
||||
public partial class BeatmapListingHeader : OverlayHeader
|
||||
{
|
||||
public BeatmapListingFilterControl FilterControl { get; private set; }
|
||||
|
||||
protected override OverlayTitle CreateTitle() => new BeatmapListingTitle();
|
||||
|
||||
protected override Drawable CreateContent() => FilterControl = new BeatmapListingFilterControl();
|
||||
|
||||
private partial class BeatmapListingTitle : OverlayTitle
|
||||
{
|
||||
public BeatmapListingTitle()
|
||||
|
@ -43,7 +43,13 @@ namespace osu.Game.Overlays
|
||||
|
||||
private Container panelTarget;
|
||||
private FillFlowContainer<BeatmapCard> foundContent;
|
||||
private BeatmapListingFilterControl filterControl;
|
||||
|
||||
private BeatmapListingFilterControl filterControl => Header.FilterControl.With(f =>
|
||||
{
|
||||
f.TypingStarted = onTypingStarted;
|
||||
f.SearchStarted = onSearchStarted;
|
||||
f.SearchFinished = onSearchFinished;
|
||||
});
|
||||
|
||||
public BeatmapListingOverlay()
|
||||
: base(OverlayColourScheme.Blue)
|
||||
@ -60,12 +66,6 @@ namespace osu.Game.Overlays
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
filterControl = new BeatmapListingFilterControl
|
||||
{
|
||||
TypingStarted = onTypingStarted,
|
||||
SearchStarted = onSearchStarted,
|
||||
SearchFinished = onSearchFinished,
|
||||
},
|
||||
new Container
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
|
Loading…
Reference in New Issue
Block a user