1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-23 03:02:55 +08:00

Rename ModState members to better convey what's what

This commit is contained in:
Bartłomiej Dach 2023-06-18 13:49:29 +02:00
parent aece548db1
commit 62f01e4f40
No known key found for this signature in database
3 changed files with 9 additions and 9 deletions

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.Mods
foreach (var mod in availableMods) foreach (var mod in availableMods)
{ {
mod.Active.BindValueChanged(_ => updateState()); mod.Active.BindValueChanged(_ => updateState());
mod.MatchingFilter.BindValueChanged(_ => updateState()); mod.MatchingTextFilter.BindValueChanged(_ => updateState());
mod.ValidForSelection.BindValueChanged(_ => updateState()); mod.ValidForSelection.BindValueChanged(_ => updateState());
} }

View File

@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Mods
base.LoadComplete(); base.LoadComplete();
modState.ValidForSelection.BindValueChanged(_ => updateFilterState()); modState.ValidForSelection.BindValueChanged(_ => updateFilterState());
modState.MatchingFilter.BindValueChanged(_ => updateFilterState(), true); modState.MatchingTextFilter.BindValueChanged(_ => updateFilterState(), true);
} }
protected override void Select() protected override void Select()
@ -100,13 +100,13 @@ namespace osu.Game.Overlays.Mods
public override bool MatchingFilter public override bool MatchingFilter
{ {
get => modState.MatchingFilter.Value; get => modState.MatchingTextFilter.Value;
set set
{ {
if (modState.MatchingFilter.Value == value) if (modState.MatchingTextFilter.Value == value)
return; return;
modState.MatchingFilter.Value = value; modState.MatchingTextFilter.Value = value;
} }
} }

View File

@ -39,14 +39,14 @@ namespace osu.Game.Overlays.Mods
public BindableBool ValidForSelection { get; } = new BindableBool(true); public BindableBool ValidForSelection { get; } = new BindableBool(true);
/// <summary> /// <summary>
/// Whether the <see cref="Mod"/> is passing all filters and visible for user /// Whether the mod is matching the current textual filter.
/// </summary> /// </summary>
public bool Visible => MatchingFilter.Value && ValidForSelection.Value; public BindableBool MatchingTextFilter { get; } = new BindableBool(true);
/// <summary> /// <summary>
/// Whether the mod is matching the current filter, i.e. it is available for user selection. /// Whether the <see cref="Mod"/> matches all applicable filters and visible for the user to select.
/// </summary> /// </summary>
public BindableBool MatchingFilter { get; } = new BindableBool(true); public bool Visible => MatchingTextFilter.Value && ValidForSelection.Value;
public ModState(Mod mod) public ModState(Mod mod)
{ {