1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 19:32:55 +08:00

Changed type of IHasFilterTerms.FilterTerms according to framework update

This commit is contained in:
MrTheMake 2017-09-13 16:18:02 +02:00
parent b08844d2db
commit 89b5a6670e
9 changed files with 13 additions and 10 deletions

View File

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

View File

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

View File

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

View File

@ -47,7 +47,7 @@ namespace osu.Game.Overlays.KeyBinding
private FillFlowContainer<KeyButton> buttons; 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) public KeyBindingRow(object action, IEnumerable<Framework.Input.Bindings.KeyBinding> bindings)
{ {

View File

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

View File

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

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; 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 public bool MatchingFilter
{ {

View File

@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Settings
public abstract string Header { get; } public abstract string Header { get; }
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>(); 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_size = 26;
private const int header_margin = 25; private const int header_margin = 25;

View File

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