mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 16:02:58 +08:00
Use ModState
in mod panels
This commit is contained in:
parent
478cfc0b87
commit
74599c9c62
@ -28,9 +28,11 @@ namespace osu.Game.Overlays.Mods
|
|||||||
{
|
{
|
||||||
public class ModPanel : OsuClickableContainer
|
public class ModPanel : OsuClickableContainer
|
||||||
{
|
{
|
||||||
public Mod Mod { get; }
|
public Mod Mod => modState.Mod;
|
||||||
public BindableBool Active { get; } = new BindableBool();
|
public BindableBool Active => modState.Active;
|
||||||
public BindableBool Filtered { get; } = new BindableBool();
|
public BindableBool Filtered => modState.Filtered;
|
||||||
|
|
||||||
|
private readonly ModState modState;
|
||||||
|
|
||||||
protected readonly Box Background;
|
protected readonly Box Background;
|
||||||
protected readonly Container SwitchContainer;
|
protected readonly Container SwitchContainer;
|
||||||
@ -57,7 +59,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
public ModPanel(Mod mod)
|
public ModPanel(Mod mod)
|
||||||
{
|
{
|
||||||
Mod = mod;
|
modState = new ModState(mod);
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 42;
|
Height = 42;
|
||||||
|
Loading…
Reference in New Issue
Block a user