mirror of
https://github.com/ppy/osu
synced 2025-01-28 16:53:02 +00:00
simplify CreateSpriteText in markdown heading
This commit is contained in:
parent
5b003750f8
commit
3524cb7924
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using Markdig.Syntax;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers.Markdown;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
|
||||
@ -68,12 +69,7 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
{
|
||||
public FontWeight Weight { get; set; }
|
||||
|
||||
protected override SpriteText CreateSpriteText()
|
||||
{
|
||||
var spriteText = base.CreateSpriteText();
|
||||
spriteText.Font = spriteText.Font.With(weight: Weight);
|
||||
return spriteText;
|
||||
}
|
||||
protected override SpriteText CreateSpriteText() => base.CreateSpriteText().With(t => t.Font = t.Font.With(weight: Weight));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user