1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 07:32:55 +08:00

use CommentMarkdownContainer in DrawableContainer

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-07-26 18:18:55 +07:00
parent 43100c5288
commit 2a6aeb5310
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -13,7 +13,6 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Bindables;
using System.Linq;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat;
using osu.Framework.Allocation;
using System.Collections.Generic;
using System;
@ -61,7 +60,7 @@ namespace osu.Game.Overlays.Comments
{
LinkFlowContainer username;
FillFlowContainer info;
LinkFlowContainer message;
CommentMarkdownContainer message;
GridContainer content;
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,
AutoSizeAxes = Axes.Y
AutoSizeAxes = Axes.Y,
DocumentMargin = new MarginPadding(0),
DocumentPadding = new MarginPadding(0),
},
info = new FillFlowContainer
{
@ -275,10 +276,7 @@ namespace osu.Game.Overlays.Comments
}
if (Comment.HasMessage)
{
var formattedSource = MessageFormatter.FormatText(Comment.Message);
message.AddLinks(formattedSource.Text, formattedSource.Links);
}
message.Text = Comment.Message;
if (Comment.IsDeleted)
{