1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:07:23 +08:00

Add glow to footerV2 buttons

This commit is contained in:
Thomas Mok 2024-05-12 01:55:18 +01:00 committed by GitHub
parent 6cfe1356cd
commit 5e8f6df799
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;
@ -68,6 +69,7 @@ namespace osu.Game.Screens.Select.FooterV2
protected Container TextContainer;
private readonly Box bar;
private readonly Box backgroundBox;
private readonly Box glowBox;
public FooterButtonV2()
{
@ -93,6 +95,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
{
@ -211,6 +217,7 @@ namespace osu.Game.Screens.Select.FooterV2
}
backgroundBox.FadeColour(backgroundColour, transition_length, Easing.OutQuint);
glowBox.Colour = ColourInfo.GradientVertical(buttonAccentColour.Opacity(0f), buttonAccentColour.Opacity(0.2f));
}
}
}