mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Added searching
This commit is contained in:
@ -11,25 +11,30 @@ using osu.Game.Online.Chat;
|
||||
|
||||
namespace osu.Game.Overlays.Chat
|
||||
{
|
||||
public class ChannelSection : Container
|
||||
public class ChannelSection : Container, IHasFilterableChildren
|
||||
{
|
||||
private readonly FillFlowContainer<ChannelListItem> items;
|
||||
private readonly OsuSpriteText header;
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => items.Children.OfType<IFilterable>();
|
||||
public string[] FilterTerms => new[] { Header };
|
||||
public bool MatchingCurrentFilter
|
||||
{
|
||||
set
|
||||
{
|
||||
FadeTo(value ? 1f : 0f, 100);
|
||||
}
|
||||
}
|
||||
|
||||
public string Header
|
||||
{
|
||||
set
|
||||
{
|
||||
header.Text = value;
|
||||
}
|
||||
get { return header.Text; }
|
||||
set { header.Text = value; }
|
||||
}
|
||||
|
||||
public IEnumerable<Channel> Channels
|
||||
{
|
||||
set
|
||||
{
|
||||
items.Children = value.Select(c => new ChannelListItem { Channel = c });
|
||||
}
|
||||
set { items.Children = value.Select(c => new ChannelListItem { Channel = c }); }
|
||||
}
|
||||
|
||||
public ChannelSection()
|
||||
|
Reference in New Issue
Block a user