Implement the freemod selection overlay

This commit is contained in:
smoogipoo
2021-02-02 21:14:38 +09:00
parent 8b3a85daa7
commit 643c0605d8
4 changed files with 165 additions and 10 deletions

View File

@ -37,8 +37,11 @@ namespace osu.Game.Overlays.Mods
protected readonly TriangleButton CustomiseButton;
protected readonly TriangleButton CloseButton;
protected readonly Drawable MultiplierSection;
protected readonly OsuSpriteText MultiplierLabel;
protected readonly FillFlowContainer FooterContainer;
protected override bool BlockNonPositionalInput => false;
protected override bool DimMainContent => false;
@ -79,8 +82,6 @@ namespace osu.Game.Overlays.Mods
private const float content_width = 0.8f;
private const float footer_button_spacing = 20;
private readonly FillFlowContainer footerContainer;
private SampleChannel sampleOn, sampleOff;
protected ModSelectOverlay()
@ -269,7 +270,7 @@ namespace osu.Game.Overlays.Mods
Colour = new Color4(172, 20, 116, 255),
Alpha = 0.5f,
},
footerContainer = new FillFlowContainer
FooterContainer = new FillFlowContainer
{
Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre,
@ -283,7 +284,7 @@ namespace osu.Game.Overlays.Mods
Vertical = 15,
Horizontal = OsuScreen.HORIZONTAL_OVERFLOW_PADDING
},
Children = new Drawable[]
Children = new[]
{
DeselectAllButton = new TriangleButton
{
@ -310,7 +311,7 @@ namespace osu.Game.Overlays.Mods
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
},
new FillFlowContainer
MultiplierSection = new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(footer_button_spacing / 2, 0),
@ -378,8 +379,8 @@ namespace osu.Game.Overlays.Mods
{
base.PopOut();
footerContainer.MoveToX(content_width, WaveContainer.DISAPPEAR_DURATION, Easing.InSine);
footerContainer.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InSine);
FooterContainer.MoveToX(content_width, WaveContainer.DISAPPEAR_DURATION, Easing.InSine);
FooterContainer.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InSine);
foreach (var section in ModSectionsContainer.Children)
{
@ -393,8 +394,8 @@ namespace osu.Game.Overlays.Mods
{
base.PopIn();
footerContainer.MoveToX(0, WaveContainer.APPEAR_DURATION, Easing.OutQuint);
footerContainer.FadeIn(WaveContainer.APPEAR_DURATION, Easing.OutQuint);
FooterContainer.MoveToX(0, WaveContainer.APPEAR_DURATION, Easing.OutQuint);
FooterContainer.FadeIn(WaveContainer.APPEAR_DURATION, Easing.OutQuint);
foreach (var section in ModSectionsContainer.Children)
{