Add corner rounding and positional transform

This commit is contained in:
Dean Herbert 2020-12-07 16:43:07 +09:00
parent 7253866e17
commit 454e94574c

View File

@ -27,10 +27,21 @@ namespace osu.Game.Overlays.Mods
private readonly FillFlowContainer<ModControlSection> modSettingsContent; private readonly FillFlowContainer<ModControlSection> modSettingsContent;
private const double transition_duration = 200; private readonly Container content;
private const double transition_duration = 400;
public ModSettingsContainer() public ModSettingsContainer()
{ {
RelativeSizeAxes = Axes.Both;
Child = content = new Container
{
Masking = true,
CornerRadius = 10,
RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.Both,
X = 1,
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box
@ -51,6 +62,7 @@ namespace osu.Game.Overlays.Mods
Padding = new MarginPadding(20), Padding = new MarginPadding(20),
} }
} }
}
}; };
} }
@ -86,11 +98,13 @@ namespace osu.Game.Overlays.Mods
protected override void PopIn() protected override void PopIn()
{ {
this.FadeIn(transition_duration, Easing.OutQuint); this.FadeIn(transition_duration, Easing.OutQuint);
content.MoveToX(0, transition_duration, Easing.OutQuint);
} }
protected override void PopOut() protected override void PopOut()
{ {
this.FadeOut(transition_duration, Easing.OutQuint); this.FadeOut(transition_duration, Easing.OutQuint);
content.MoveToX(1, transition_duration, Easing.OutQuint);
} }
} }
} }