mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 16:02:58 +08:00
Split model class for mod state
This commit is contained in:
parent
315c67a316
commit
478cfc0b87
35
osu.Game/Overlays/Mods/ModState.cs
Normal file
35
osu.Game/Overlays/Mods/ModState.cs
Normal file
@ -0,0 +1,35 @@
|
||||
// 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.
|
||||
|
||||
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 is currently filtered out due to not matching imposed criteria.
|
||||
/// </summary>
|
||||
public BindableBool Filtered { get; } = new BindableBool();
|
||||
|
||||
public ModState(Mod mod)
|
||||
{
|
||||
Mod = mod;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user