mirror of
https://github.com/ppy/osu.git
synced 2025-01-23 06:13:03 +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)
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user