mirror of https://github.com/ppy/osu
Add support for overlay-coloured links
This commit is contained in:
parent
de2900bc7c
commit
e3b8d8ee18
|
@ -8,6 +8,7 @@
|
|||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Online.Chat
|
||||
|
@ -20,7 +21,10 @@ public class DrawableLinkCompiler : OsuHoverContainer
|
|||
/// <summary>
|
||||
/// Each word part of a chat link (split for word-wrap support).
|
||||
/// </summary>
|
||||
public List<Drawable> Parts;
|
||||
public readonly List<Drawable> Parts;
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private OverlayColourProvider overlayColourProvider { get; set; }
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => Parts.Any(d => d.ReceivePositionalInputAt(screenSpacePos));
|
||||
|
||||
|
@ -34,7 +38,7 @@ public DrawableLinkCompiler(IEnumerable<Drawable> parts)
|
|||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
IdleColour = colours.Blue;
|
||||
IdleColour = overlayColourProvider?.Light2 ?? colours.Blue;
|
||||
}
|
||||
|
||||
protected override IEnumerable<Drawable> EffectTargets => Parts;
|
||||
|
|
Loading…
Reference in New Issue