Skip to content

Commit

Permalink
Add glow to footerV2 buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
tomm13 authored May 12, 2024
1 parent 6cfe135 commit 5e8f6df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions osu.Game/Screens/Select/FooterV2/FooterButtonV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
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;
Expand Down Expand Up @@ -68,6 +69,7 @@ protected LocalisableString Text
protected Container TextContainer;
private readonly Box bar;
private readonly Box backgroundBox;
private readonly Box glowBox;

public FooterButtonV2()
{
Expand All @@ -93,6 +95,10 @@ public FooterButtonV2()
{
RelativeSizeAxes = Axes.Both
},
glowBox = new Box
{
RelativeSizeAxes = Axes.Both
},
// For elements that should not be sheared.
new Container
{
Expand Down Expand Up @@ -211,6 +217,7 @@ private void updateDisplay()
}

backgroundBox.FadeColour(backgroundColour, transition_length, Easing.OutQuint);
glowBox.Colour = ColourInfo.GradientVertical(buttonAccentColour.Opacity(0f), buttonAccentColour.Opacity(0.2f));
}
}
}

0 comments on commit 5e8f6df

Please sign in to comment.