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