1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 16:12:54 +08:00

Merge pull request #1260 from MrTheMake/ihasfilterterms-filterterms-ienumerable

Changed type of IHasFilterTerms.FilterTerms according to framework update
This commit is contained in:
Dean Herbert 2017-09-14 08:10:55 +09:00 committed by GitHub
commit 0ca60eaecc
10 changed files with 14 additions and 11 deletions

@ -1 +1 @@
Subproject commit f039a8cb707296238d22b6c382af862725c05928
Subproject commit b060218232fcd6f24d4922d05160616db0195bd4

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Audio;
@ -112,7 +113,7 @@ namespace osu.Game.Graphics.UserInterface
return base.OnMouseUp(state, args);
}
public string[] FilterTerms => new[] { Text };
public IEnumerable<string> FilterTerms => new[] { Text };
public bool MatchingFilter
{

View File

@ -2,6 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Allocation;
@ -34,7 +35,7 @@ namespace osu.Game.Overlays.Chat
private Color4 topicColour;
private Color4 hoverColour;
public string[] FilterTerms => new[] { channel.Name };
public IEnumerable<string> FilterTerms => new[] { channel.Name };
public bool MatchingFilter
{
set

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Chat
public readonly FillFlowContainer<ChannelListItem> ChannelFlow;
public IEnumerable<IFilterable> FilterableChildren => ChannelFlow.Children;
public string[] FilterTerms => new[] { Header };
public IEnumerable<string> FilterTerms => new[] { Header };
public bool MatchingFilter
{
set

View File

@ -47,7 +47,7 @@ namespace osu.Game.Overlays.KeyBinding
private FillFlowContainer<KeyButton> buttons;
public string[] FilterTerms => new[] { text.Text }.Concat(bindings.Select(b => b.KeyCombination.ReadableString())).ToArray();
public IEnumerable<string> FilterTerms => new[] { text.Text }.Concat(bindings.Select(b => b.KeyCombination.ReadableString())).ToArray();
public KeyBindingRow(object action, IEnumerable<Framework.Input.Bindings.KeyBinding> bindings)
{
@ -371,4 +371,4 @@ namespace osu.Game.Overlays.KeyBinding
}
}
}
}
}

View File

@ -129,7 +129,7 @@ namespace osu.Game.Overlays.Music
return true;
}
public string[] FilterTerms { get; private set; }
public IEnumerable<string> FilterTerms { get; private set; }
private bool matching = true;

View File

@ -229,7 +229,7 @@ namespace osu.Game.Overlays.Music
private class ItemSearchContainer : FillFlowContainer<PlaylistItem>, IHasFilterableChildren
{
public string[] FilterTerms => new string[] { };
public IEnumerable<string> FilterTerms => new string[] { };
public bool MatchingFilter
{
set

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using OpenTK.Graphics;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
@ -53,7 +54,7 @@ namespace osu.Game.Overlays.Settings
}
}
public string[] FilterTerms => new[] { LabelText };
public IEnumerable<string> FilterTerms => new[] { LabelText };
public bool MatchingFilter
{

View File

@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Settings
public abstract string Header { get; }
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
public string[] FilterTerms => new[] { Header };
public IEnumerable<string> FilterTerms => new[] { Header };
private const int header_size = 26;
private const int header_margin = 25;

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Settings
protected abstract string Header { get; }
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
public string[] FilterTerms => new[] { Header };
public IEnumerable<string> FilterTerms => new[] { Header };
public bool MatchingFilter
{
set