mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 06:13:04 +08:00
use CommentMarkdownContainer in DrawableContainer
This commit is contained in:
parent
43100c5288
commit
2a6aeb5310
@ -13,7 +13,6 @@ using osu.Framework.Graphics.Cursor;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Online.Chat;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
@ -61,7 +60,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
LinkFlowContainer username;
|
LinkFlowContainer username;
|
||||||
FillFlowContainer info;
|
FillFlowContainer info;
|
||||||
LinkFlowContainer message;
|
CommentMarkdownContainer message;
|
||||||
GridContainer content;
|
GridContainer content;
|
||||||
VotePill votePill;
|
VotePill votePill;
|
||||||
|
|
||||||
@ -153,10 +152,12 @@ namespace osu.Game.Overlays.Comments
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
message = new LinkFlowContainer(s => s.Font = OsuFont.GetFont(size: 14))
|
message = new CommentMarkdownContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y
|
AutoSizeAxes = Axes.Y,
|
||||||
|
DocumentMargin = new MarginPadding(0),
|
||||||
|
DocumentPadding = new MarginPadding(0),
|
||||||
},
|
},
|
||||||
info = new FillFlowContainer
|
info = new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -275,10 +276,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Comment.HasMessage)
|
if (Comment.HasMessage)
|
||||||
{
|
message.Text = Comment.Message;
|
||||||
var formattedSource = MessageFormatter.FormatText(Comment.Message);
|
|
||||||
message.AddLinks(formattedSource.Text, formattedSource.Links);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Comment.IsDeleted)
|
if (Comment.IsDeleted)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user