mirror of
https://github.com/ppy/osu
synced 2025-01-20 13:00:54 +00:00
hide label when mod is empty
This commit is contained in:
parent
73a83e7f05
commit
4f0aff3d9c
@ -50,6 +50,34 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
ButtonsContainer.Children = modContainers;
|
||||
buttons = modContainers.OfType<ModButton>().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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user