Add a User property to the comment for easy access

This commit is contained in:
Andrei Zavatski
2019-10-08 13:45:13 +03:00
parent 275648ee4f
commit 801b5b474e
3 changed files with 42 additions and 3 deletions

View File

@ -103,11 +103,29 @@ namespace osu.Game.Overlays
Height = 70,
Children = new Drawable[]
{
new SpriteText
new FillFlowContainer
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Text = comment.GetMessage(),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 3),
Children = new[]
{
new SpriteText
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Text = $"user: {comment.User.Username}",
},
new SpriteText
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Text = $"message: {comment.GetMessage()}",
},
}
},
new Container
{