diff --git a/osu.Game/Overlays/Mods/ModSection.cs b/osu.Game/Overlays/Mods/ModSection.cs index 50400e254f..9d9bb2ba6e 100644 --- a/osu.Game/Overlays/Mods/ModSection.cs +++ b/osu.Game/Overlays/Mods/ModSection.cs @@ -50,6 +50,34 @@ namespace osu.Game.Overlays.Mods ButtonsContainer.Children = modContainers; buttons = modContainers.OfType().ToArray(); + + Expanded = value.Any(); + } + } + + private bool expanded = true; + + public bool Expanded + { + set + { + if (expanded == value) return; + + expanded = value; + + this.ClearTransforms(); + + if (expanded) + { + this.AutoSizeAxes = Axes.Y; + this.headerLabel.FadeIn(200); + } + else + { + this.AutoSizeAxes = Axes.None; + this.headerLabel.FadeOut(200); + this.ResizeHeightTo(0, 200, Easing.OutQuint); + } } }