mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09: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;
|
ButtonsContainer.Children = modContainers;
|
||||||
buttons = modContainers.OfType<ModButton>().ToArray();
|
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…
x
Reference in New Issue
Block a user