Linkify more user links

This commit is contained in:
smoogipoo
2019-05-14 18:11:32 +09:00
parent b2fe9dd1a0
commit 77263bd56e
2 changed files with 18 additions and 49 deletions

View File

@ -15,6 +15,7 @@ using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics.Containers;
namespace osu.Game.Overlays.Direct
{
@ -119,28 +120,16 @@ namespace osu.Game.Overlays.Direct
},
Children = new Drawable[]
{
new FillFlowContainer
new LinkFlowContainer(s =>
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Horizontal,
Children = new[]
{
new OsuSpriteText
{
Text = "mapped by ",
Font = OsuFont.GetFont(size: 14),
Shadow = false,
Colour = colours.Gray5,
},
new OsuSpriteText
{
Text = SetInfo.Metadata.Author.Username,
Font = OsuFont.GetFont(size: 14, weight: FontWeight.SemiBold, italics: true),
Shadow = false,
Colour = colours.BlueDark,
},
},
},
s.Shadow = false;
s.Font = OsuFont.GetFont(size: 14);
}).With(d =>
{
d.AutoSizeAxes = Axes.Both;
d.AddText("mapped by ", t => t.Colour = colours.Gray5);
d.AddUserLink(SetInfo.Metadata.Author);
}),
new Container
{
AutoSizeAxes = Axes.X,