mirror of
https://github.com/ppy/osu.git
synced 2025-03-19 01:17:19 +08:00
simplify CreateEmphasisedSpriteText
This commit is contained in:
parent
17b8963cf8
commit
79a1d7b2b3
@ -3,6 +3,7 @@
|
||||
|
||||
using Markdig.Syntax.Inlines;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers.Markdown;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -28,10 +29,6 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
=> AddText(codeInline.Content, t => { t.Colour = colourProvider.Light1; });
|
||||
|
||||
protected override SpriteText CreateEmphasisedSpriteText(bool bold, bool italic)
|
||||
{
|
||||
var spriteText = CreateSpriteText();
|
||||
spriteText.Font = spriteText.Font.With(weight: bold ? FontWeight.Bold : FontWeight.Regular, italics: italic);
|
||||
return spriteText;
|
||||
}
|
||||
=> CreateSpriteText().With(t => t.Font = t.Font.With(weight: bold ? FontWeight.Bold : FontWeight.Regular, italics: italic));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user