mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Merge pull request #13899 from gagahpangeran/image-caption-tfc
This commit is contained in:
commit
01c9e9adcc
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Wiki.Markdown
|
||||
public class WikiMarkdownImageBlock : FillFlowContainer
|
||||
{
|
||||
[Resolved]
|
||||
private IMarkdownTextComponent parentTextComponent { get; set; }
|
||||
private IMarkdownTextFlowComponent parentFlowComponent { get; set; }
|
||||
|
||||
private readonly LinkInline linkInline;
|
||||
|
||||
@ -31,16 +31,20 @@ namespace osu.Game.Overlays.Wiki.Markdown
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
MarkdownTextFlowContainer textFlow;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new BlockMarkdownImage(linkInline),
|
||||
parentTextComponent.CreateSpriteText().With(t =>
|
||||
textFlow = parentFlowComponent.CreateTextFlow().With(t =>
|
||||
{
|
||||
t.Text = linkInline.Title;
|
||||
t.Anchor = Anchor.TopCentre;
|
||||
t.Origin = Anchor.TopCentre;
|
||||
t.TextAnchor = Anchor.TopCentre;
|
||||
}),
|
||||
};
|
||||
|
||||
textFlow.AddText(linkInline.Title);
|
||||
}
|
||||
|
||||
private class BlockMarkdownImage : WikiMarkdownImage
|
||||
|
Loading…
Reference in New Issue
Block a user