mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Hide mod columns if all mods within are filtered out
This commit is contained in:
@ -55,8 +55,18 @@ namespace osu.Game.Overlays.Mods
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this column should accept user input.
|
||||
/// </summary>
|
||||
public Bindable<bool> Active = new BindableBool(true);
|
||||
|
||||
private readonly Bindable<bool> allFiltered = new BindableBool();
|
||||
|
||||
/// <summary>
|
||||
/// True if all of the panels in this column have been filtered out by the current <see cref="Filter"/>.
|
||||
/// </summary>
|
||||
public IBindable<bool> AllFiltered => allFiltered;
|
||||
|
||||
/// <summary>
|
||||
/// List of mods marked as selected in this column.
|
||||
/// </summary>
|
||||
@ -339,6 +349,9 @@ namespace osu.Game.Overlays.Mods
|
||||
panel.ApplyFilter(Filter);
|
||||
}
|
||||
|
||||
allFiltered.Value = panelFlow.All(panel => panel.Filtered.Value);
|
||||
Alpha = allFiltered.Value ? 0 : 1;
|
||||
|
||||
if (toggleAllCheckbox != null && !SelectionAnimationRunning)
|
||||
{
|
||||
toggleAllCheckbox.Alpha = panelFlow.Any(panel => !panel.Filtered.Value) ? 1 : 0;
|
||||
|
Reference in New Issue
Block a user