mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:03:08 +08:00
Add OsuMarkdownLinkText
Color from
d56352aeef/resources/assets/less/functions.less (L159-L165)
This commit is contained in:
parent
b75b9a97ed
commit
aa07482cbb
32
osu.Game/Graphics/Containers/Markdown/OsuMarkdownLinkText.cs
Normal file
32
osu.Game/Graphics/Containers/Markdown/OsuMarkdownLinkText.cs
Normal file
@ -0,0 +1,32 @@
|
||||
// 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.
|
||||
|
||||
using Markdig.Syntax.Inlines;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Containers.Markdown;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Graphics.Containers.Markdown
|
||||
{
|
||||
public class OsuMarkdownLinkText : MarkdownLinkText
|
||||
{
|
||||
private SpriteText spriteText;
|
||||
|
||||
public OsuMarkdownLinkText(string text, LinkInline linkInline)
|
||||
: base(text, linkInline)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
spriteText.Colour = colourProvider.Light2;
|
||||
}
|
||||
|
||||
public override SpriteText CreateSpriteText()
|
||||
{
|
||||
return spriteText = base.CreateSpriteText();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user