mirror of
https://github.com/ppy/osu
synced 2024-12-09 08:30:36 +00:00
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
// 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.
|
|
|
|
#nullable disable
|
|
|
|
using osu.Framework.Bindables;
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
namespace osu.Game.Overlays.Mods
|
|
{
|
|
/// <summary>
|
|
/// Wrapper class used to store the current state of a mod shown on the <see cref="ModSelectOverlay"/>.
|
|
/// Used primarily to decouple data from drawable logic.
|
|
/// </summary>
|
|
public class ModState
|
|
{
|
|
/// <summary>
|
|
/// The mod that whose state this instance describes.
|
|
/// </summary>
|
|
public Mod Mod { get; }
|
|
|
|
/// <summary>
|
|
/// Whether the mod is currently selected.
|
|
/// </summary>
|
|
public BindableBool Active { get; } = new BindableBool();
|
|
|
|
/// <summary>
|
|
/// Whether the mod requires further customisation.
|
|
/// This flag is read by the <see cref="ModSelectOverlay"/> to determine if the customisation panel should be opened after a mod change
|
|
/// and cleared after reading.
|
|
/// </summary>
|
|
public bool PendingConfiguration { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether the mod is currently filtered out due to not matching imposed criteria.
|
|
/// </summary>
|
|
public BindableBool Filtered { get; } = new BindableBool();
|
|
|
|
public ModState(Mod mod)
|
|
{
|
|
Mod = mod;
|
|
}
|
|
}
|
|
}
|