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

Fix glow flash occurring after releasing mouse and adjust transition slightly

This commit is contained in:
Dean Herbert 2023-02-08 13:59:09 +09:00
parent c691a0d3af
commit cec1f77e6c

View File

@ -58,7 +58,7 @@ namespace osu.Game.Graphics.UserInterface
private void load(OverlayColourProvider? colourProvider, OsuColour colours) private void load(OverlayColourProvider? colourProvider, OsuColour colours)
{ {
AccentColour = colourProvider?.Highlight1 ?? colours.Pink; AccentColour = colourProvider?.Highlight1 ?? colours.Pink;
GlowingAccentColour = colourProvider?.Highlight1.Lighten(0.2f) ?? colours.PinkLighter; GlowingAccentColour = colourProvider?.Highlight1.Lighten(0.4f) ?? colours.PinkLighter;
GlowColour = colourProvider?.Highlight1 ?? colours.PinkLighter; GlowColour = colourProvider?.Highlight1 ?? colours.PinkLighter;
main.EdgeEffect = new EdgeEffectParameters main.EdgeEffect = new EdgeEffectParameters
@ -84,11 +84,14 @@ namespace osu.Game.Graphics.UserInterface
get => glowing; get => glowing;
set set
{ {
if (glowing == value)
return;
glowing = value; glowing = value;
if (value) if (value)
{ {
main.FadeColour(GlowingAccentColour.Lighten(0.5f), 40, Easing.OutQuint) main.FadeColour(GlowingAccentColour.Lighten(0.1f), 40, Easing.OutQuint)
.Then() .Then()
.FadeColour(GlowingAccentColour, 800, Easing.OutQuint); .FadeColour(GlowingAccentColour, 800, Easing.OutQuint);