2023-05-03 19:00:46 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
|
2023-05-07 20:14:49 +08:00
|
|
|
|
namespace osu.Game.Overlays.Mods
|
2023-05-03 19:00:46 +08:00
|
|
|
|
{
|
2023-05-07 20:14:49 +08:00
|
|
|
|
public partial class ModSearchContainer : SearchContainer
|
2023-05-03 19:00:46 +08:00
|
|
|
|
{
|
2023-05-07 20:14:49 +08:00
|
|
|
|
/// <summary>
|
2023-05-28 18:21:41 +08:00
|
|
|
|
/// Same as <see cref="SearchContainer{T}.SearchTerm"/> except the filtering is guarantied to be performed
|
2023-05-07 20:14:49 +08:00
|
|
|
|
/// </summary>
|
2023-05-28 15:04:26 +08:00
|
|
|
|
/// <remarks>
|
2023-05-28 18:21:41 +08:00
|
|
|
|
/// This is required because <see cref="ModColumn"/> can be hidden when search term applied
|
|
|
|
|
/// therefore <see cref="SearchContainer{T}.Update"/> cannot be reached and filter cannot automatically re-validate itself.
|
2023-05-28 15:04:26 +08:00
|
|
|
|
/// </remarks>
|
2023-05-07 20:14:49 +08:00
|
|
|
|
public string ForcedSearchTerm
|
2023-05-03 19:00:46 +08:00
|
|
|
|
{
|
2023-05-07 20:14:49 +08:00
|
|
|
|
get => SearchTerm;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == SearchTerm)
|
|
|
|
|
return;
|
2023-05-03 19:00:46 +08:00
|
|
|
|
|
2023-05-07 20:14:49 +08:00
|
|
|
|
SearchTerm = value;
|
|
|
|
|
Update();
|
|
|
|
|
}
|
2023-05-03 19:00:46 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|