mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 17:13:06 +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
|
public class WikiMarkdownImageBlock : FillFlowContainer
|
||||||
{
|
{
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private IMarkdownTextComponent parentTextComponent { get; set; }
|
private IMarkdownTextFlowComponent parentFlowComponent { get; set; }
|
||||||
|
|
||||||
private readonly LinkInline linkInline;
|
private readonly LinkInline linkInline;
|
||||||
|
|
||||||
@ -31,16 +31,20 @@ namespace osu.Game.Overlays.Wiki.Markdown
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
MarkdownTextFlowContainer textFlow;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new BlockMarkdownImage(linkInline),
|
new BlockMarkdownImage(linkInline),
|
||||||
parentTextComponent.CreateSpriteText().With(t =>
|
textFlow = parentFlowComponent.CreateTextFlow().With(t =>
|
||||||
{
|
{
|
||||||
t.Text = linkInline.Title;
|
|
||||||
t.Anchor = Anchor.TopCentre;
|
t.Anchor = Anchor.TopCentre;
|
||||||
t.Origin = Anchor.TopCentre;
|
t.Origin = Anchor.TopCentre;
|
||||||
|
t.TextAnchor = Anchor.TopCentre;
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
textFlow.AddText(linkInline.Title);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class BlockMarkdownImage : WikiMarkdownImage
|
private class BlockMarkdownImage : WikiMarkdownImage
|
||||||
|
Loading…
Reference in New Issue
Block a user