Add placeholder logic for filtering.

This commit is contained in:
Dean Herbert
2017-05-01 15:27:41 +09:00
parent a1f341a64f
commit 2cfb83436d
2 changed files with 12 additions and 1 deletions

View File

@ -46,10 +46,16 @@ namespace osu.Game.Overlays.Music
}, },
}, },
}; };
Search.Current.ValueChanged += current_ValueChanged;
} }
private void current_ValueChanged(string newValue) => FilterChanged?.Invoke(newValue);
public Action ExitRequested; public Action ExitRequested;
public Action<string> FilterChanged;
public class FilterTextBox : SearchTextBox public class FilterTextBox : SearchTextBox
{ {
protected override Color4 BackgroundUnfocused => OsuColour.FromHex(@"222222"); protected override Color4 BackgroundUnfocused => OsuColour.FromHex(@"222222");

View File

@ -74,18 +74,23 @@ namespace osu.Game.Overlays.Music
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
ExitRequested = () => State = Visibility.Hidden, ExitRequested = () => State = Visibility.Hidden,
FilterChanged = filterChanged,
Padding = new MarginPadding(10), Padding = new MarginPadding(10),
}, },
}, },
}, },
}; };
list.BeatmapSets = BeatmapSets = beatmaps.GetAllWithChildren<BeatmapSetInfo>().ToList(); list.BeatmapSets = BeatmapSets = beatmaps.GetAllWithChildren<BeatmapSetInfo>().ToList();
beatmapBacking.BindTo(game.Beatmap); beatmapBacking.BindTo(game.Beatmap);
} }
private void filterChanged(string newValue)
{
// TODO: implement
}
protected override void LoadComplete() protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();