1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:17:51 +08:00

Merge pull request #28154 from tomm13/glow

Add glow to footerV2 buttons
This commit is contained in:
Dean Herbert 2024-05-12 14:45:46 +08:00 committed by GitHub
commit 4dd2d47458
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes;
@ -66,6 +67,7 @@ namespace osu.Game.Screens.Select.FooterV2
protected Container TextContainer;
private readonly Box bar;
private readonly Box backgroundBox;
private readonly Box glowBox;
private readonly Box flashLayer;
public FooterButtonV2()
@ -92,6 +94,10 @@ namespace osu.Game.Screens.Select.FooterV2
{
RelativeSizeAxes = Axes.Both
},
glowBox = new Box
{
RelativeSizeAxes = Axes.Both
},
// For elements that should not be sheared.
new Container
{
@ -207,6 +213,8 @@ namespace osu.Game.Screens.Select.FooterV2
text.FadeColour(textColour, 150, Easing.OutQuint);
icon.FadeColour(accentColour, 150, Easing.OutQuint);
bar.FadeColour(accentColour, 150, Easing.OutQuint);
glowBox.FadeColour(ColourInfo.GradientVertical(buttonAccentColour.Opacity(0f), buttonAccentColour.Opacity(0.2f)), 150, Easing.OutQuint);
}
}
}