1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-30 03:59:55 +08:00

Use ModState in mod panels

This commit is contained in:
Bartłomiej Dach
2022-05-11 18:29:14 +02:00
Unverified
parent 478cfc0b87
commit 74599c9c62
+6 -4
View File
@@ -28,9 +28,11 @@ namespace osu.Game.Overlays.Mods
{
public class ModPanel : OsuClickableContainer
{
public Mod Mod { get; }
public BindableBool Active { get; } = new BindableBool();
public BindableBool Filtered { get; } = new BindableBool();
public Mod Mod => modState.Mod;
public BindableBool Active => modState.Active;
public BindableBool Filtered => modState.Filtered;
private readonly ModState modState;
protected readonly Box Background;
protected readonly Container SwitchContainer;
@@ -57,7 +59,7 @@ namespace osu.Game.Overlays.Mods
public ModPanel(Mod mod)
{
Mod = mod;
modState = new ModState(mod);
RelativeSizeAxes = Axes.X;
Height = 42;