use show/hide instead because FillFlowContainer's spacing

This commit is contained in:
andy840119
2019-06-14 01:43:20 +09:00
parent 4f0aff3d9c
commit 3a14794c43
2 changed files with 5 additions and 16 deletions

View File

@ -51,32 +51,19 @@ 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();
var expanded = value.Any();
if (expanded)
{
this.AutoSizeAxes = Axes.Y;
this.headerLabel.FadeIn(200);
Show();
}
else
{
this.AutoSizeAxes = Axes.None;
this.headerLabel.FadeOut(200);
this.ResizeHeightTo(0, 200, Easing.OutQuint);
this.ResizeHeightTo(0, 200, Easing.OutQuint).OnComplete((c) => Hide());
}
}
}