mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
use inline code in markdown text flow
This commit is contained in:
parent
1babb05fc7
commit
5108dadfbc
@ -14,15 +14,14 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
{
|
||||
public class OsuMarkdownTextFlowContainer : MarkdownTextFlowContainer
|
||||
{
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; }
|
||||
|
||||
protected override void AddLinkText(string text, LinkInline linkInline)
|
||||
=> AddDrawable(new OsuMarkdownLinkText(text, linkInline));
|
||||
|
||||
// TODO : Add background (colour B6) and change font to monospace
|
||||
protected override void AddCodeInLine(CodeInline codeInline)
|
||||
=> AddText(codeInline.Content, t => { t.Colour = colourProvider.Light1; });
|
||||
// TODO : Change font to monospace
|
||||
protected override void AddCodeInLine(CodeInline codeInline) => AddDrawable(new OsuMarkdownInlineCode
|
||||
{
|
||||
Text = codeInline.Content
|
||||
});
|
||||
|
||||
protected override SpriteText CreateEmphasisedSpriteText(bool bold, bool italic)
|
||||
=> CreateSpriteText().With(t => t.Font = t.Font.With(weight: bold ? FontWeight.Bold : FontWeight.Regular, italics: italic));
|
||||
|
Loading…
Reference in New Issue
Block a user