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

Use OsuColour.Red1 for ControlItemClose hover colour

This commit is contained in:
Jai Sharma 2022-03-14 21:10:39 +00:00
parent e91af664ef
commit 9621ef9437
2 changed files with 11 additions and 3 deletions

View File

@ -8,6 +8,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Chat; using osu.Game.Online.Chat;
@ -23,6 +24,9 @@ namespace osu.Game.Tests.Visual.Online
[Cached] [Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink); private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Pink);
[Cached]
private readonly OsuColour osuColour = new OsuColour();
[Cached] [Cached]
private readonly Bindable<Channel> selected = new Bindable<Channel>(); private readonly Bindable<Channel> selected = new Bindable<Channel>();

View File

@ -1,12 +1,13 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osuTK; using osuTK;
using osuTK.Graphics;
namespace osu.Game.Overlays.Chat.ChannelControl namespace osu.Game.Overlays.Chat.ChannelControl
{ {
@ -14,6 +15,9 @@ namespace osu.Game.Overlays.Chat.ChannelControl
{ {
private readonly SpriteIcon icon; private readonly SpriteIcon icon;
[Resolved]
private OsuColour osuColour { get; set; } = null!;
public ControlItemClose() public ControlItemClose()
{ {
Alpha = 0f; Alpha = 0f;
@ -42,13 +46,13 @@ namespace osu.Game.Overlays.Chat.ChannelControl
protected override bool OnHover(HoverEvent e) protected override bool OnHover(HoverEvent e)
{ {
icon.FadeColour(Color4.Red, 200, Easing.OutQuint); icon.FadeColour(osuColour.Red1, 200, Easing.OutQuint);
return base.OnHover(e); return base.OnHover(e);
} }
protected override void OnHoverLost(HoverLostEvent e) protected override void OnHoverLost(HoverLostEvent e)
{ {
icon.FadeColour(Color4.White, 200, Easing.OutQuint); icon.FadeColour(Colour4.White, 200, Easing.OutQuint);
base.OnHoverLost(e); base.OnHoverLost(e);
} }
} }