mirror of
https://github.com/ppy/osu
synced 2025-01-03 12:52:10 +00:00
use show/hide instead because FillFlowContainer's spacing
This commit is contained in:
parent
4f0aff3d9c
commit
3a14794c43
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,6 +172,8 @@ namespace osu.Game.Overlays.Mods
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Spacing = new Vector2(0f, 10f),
|
||||
Width = content_width,
|
||||
LayoutDuration = 200,
|
||||
LayoutEasing = Easing.OutQuint,
|
||||
Children = new ModSection[]
|
||||
{
|
||||
new DifficultyReductionSection { Action = modButtonPressed },
|
||||
|
Loading…
Reference in New Issue
Block a user