mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
add font size in HeadingTextFlowContainer
This commit is contained in:
@ -20,7 +20,8 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
|
||||
public override MarkdownTextFlowContainer CreateTextFlow() => new HeadingTextFlowContainer
|
||||
{
|
||||
Weight = GetFontWeightByLevel(level),
|
||||
FontSize = GetFontSizeByLevel(level),
|
||||
FontWeight = GetFontWeightByLevel(level),
|
||||
};
|
||||
|
||||
protected override float GetFontSizeByLevel(int level)
|
||||
@ -65,9 +66,11 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
|
||||
private class HeadingTextFlowContainer : OsuMarkdownTextFlowContainer
|
||||
{
|
||||
public FontWeight Weight { get; set; }
|
||||
public float FontSize;
|
||||
public FontWeight FontWeight;
|
||||
|
||||
protected override SpriteText CreateSpriteText() => base.CreateSpriteText().With(t => t.Font = t.Font.With(weight: Weight));
|
||||
protected override SpriteText CreateSpriteText()
|
||||
=> base.CreateSpriteText().With(t => t.Font = t.Font.With(size: FontSize, weight: FontWeight));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user