mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:13:21 +08:00
Rename ModState
members to better convey what's what
This commit is contained in:
parent
aece548db1
commit
62f01e4f40
@ -46,7 +46,7 @@ namespace osu.Game.Overlays.Mods
|
||||
foreach (var mod in availableMods)
|
||||
{
|
||||
mod.Active.BindValueChanged(_ => updateState());
|
||||
mod.MatchingFilter.BindValueChanged(_ => updateState());
|
||||
mod.MatchingTextFilter.BindValueChanged(_ => updateState());
|
||||
mod.ValidForSelection.BindValueChanged(_ => updateState());
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Mods
|
||||
base.LoadComplete();
|
||||
|
||||
modState.ValidForSelection.BindValueChanged(_ => updateFilterState());
|
||||
modState.MatchingFilter.BindValueChanged(_ => updateFilterState(), true);
|
||||
modState.MatchingTextFilter.BindValueChanged(_ => updateFilterState(), true);
|
||||
}
|
||||
|
||||
protected override void Select()
|
||||
@ -100,13 +100,13 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
public override bool MatchingFilter
|
||||
{
|
||||
get => modState.MatchingFilter.Value;
|
||||
get => modState.MatchingTextFilter.Value;
|
||||
set
|
||||
{
|
||||
if (modState.MatchingFilter.Value == value)
|
||||
if (modState.MatchingTextFilter.Value == value)
|
||||
return;
|
||||
|
||||
modState.MatchingFilter.Value = value;
|
||||
modState.MatchingTextFilter.Value = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,14 +39,14 @@ namespace osu.Game.Overlays.Mods
|
||||
public BindableBool ValidForSelection { get; } = new BindableBool(true);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the <see cref="Mod"/> is passing all filters and visible for user
|
||||
/// Whether the mod is matching the current textual filter.
|
||||
/// </summary>
|
||||
public bool Visible => MatchingFilter.Value && ValidForSelection.Value;
|
||||
public BindableBool MatchingTextFilter { get; } = new BindableBool(true);
|
||||
|
||||
/// <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>
|
||||
public BindableBool MatchingFilter { get; } = new BindableBool(true);
|
||||
public bool Visible => MatchingTextFilter.Value && ValidForSelection.Value;
|
||||
|
||||
public ModState(Mod mod)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user