mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 11:22:55 +08:00
Reduce brightness of hover effect
This commit is contained in:
parent
64c1ced80d
commit
e7c4451206
@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OverlayColourProvider colourProvider { get; set; } = null!;
|
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||||
|
|
||||||
public readonly Bindable<ModCustomisationPanelState> ExpandedState = new Bindable<ModCustomisationPanelState>(ModCustomisationPanelState.Collapsed);
|
public readonly Bindable<ModCustomisationPanelState> ExpandedState = new Bindable<ModCustomisationPanelState>();
|
||||||
|
|
||||||
private readonly ModCustomisationPanel panel;
|
private readonly ModCustomisationPanel panel;
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ namespace osu.Game.Overlays.Mods
|
|||||||
hoverBackground = new Box
|
hoverBackground = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = OsuColour.Gray(80).Opacity(180),
|
Colour = OsuColour.Gray(50),
|
||||||
Blending = BlendingParameters.Additive,
|
Blending = BlendingParameters.Additive,
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
},
|
},
|
||||||
@ -134,16 +134,13 @@ namespace osu.Game.Overlays.Mods
|
|||||||
if (panel.ExpandedState.Value == ModCustomisationPanelState.Collapsed)
|
if (panel.ExpandedState.Value == ModCustomisationPanelState.Collapsed)
|
||||||
panel.ExpandedState.Value = ModCustomisationPanelState.Expanded;
|
panel.ExpandedState.Value = ModCustomisationPanelState.Expanded;
|
||||||
|
|
||||||
hoverBackground.FadeIn(200);
|
hoverBackground.FadeTo(0.4f, 200, Easing.OutQuint);
|
||||||
|
|
||||||
return base.OnHover(e);
|
return base.OnHover(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(HoverLostEvent e)
|
protected override void OnHoverLost(HoverLostEvent e)
|
||||||
{
|
{
|
||||||
if (Enabled.Value)
|
hoverBackground.FadeOut(200, Easing.OutQuint);
|
||||||
hoverBackground.FadeOut(200);
|
|
||||||
|
|
||||||
base.OnHoverLost(e);
|
base.OnHoverLost(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user