diff --git a/osu.Game/Screens/Multi/Lounge/Components/ParticipantInfo.cs b/osu.Game/Screens/Multi/Lounge/Components/ParticipantInfo.cs index 3bc20b58c5..042dd96b61 100644 --- a/osu.Game/Screens/Multi/Lounge/Components/ParticipantInfo.cs +++ b/osu.Game/Screens/Multi/Lounge/Components/ParticipantInfo.cs @@ -9,7 +9,9 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Game.Graphics; +using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; +using osu.Game.Online.Chat; using osu.Game.Users; using osuTK; @@ -17,7 +19,6 @@ namespace osu.Game.Screens.Multi.Lounge.Components { public class ParticipantInfo : Container { - private readonly OsuSpriteText host; private readonly FillFlowContainer levelRangeContainer; public readonly Bindable Host = new Bindable(); @@ -31,6 +32,7 @@ public ParticipantInfo(string rankPrefix = null) OsuSpriteText levelRangeHigher; OsuSpriteText levelRangeLower; Container flagContainer; + LinkFlowContainer hostText; Children = new Drawable[] { @@ -62,20 +64,12 @@ public ParticipantInfo(string rankPrefix = null) }, }, }, - new OsuSpriteText - { - Text = "hosted by", - Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, - TextSize = 14, - }, - host = new OsuSpriteText + hostText = new LinkFlowContainer { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, - TextSize = 14, - Font = @"Exo2.0-BoldItalic", - }, + AutoSizeAxes = Axes.Both + } }, }, levelRangeContainer = new FillFlowContainer @@ -122,7 +116,10 @@ public ParticipantInfo(string rankPrefix = null) Host.BindValueChanged(v => { - host.Text = v.Username; + hostText.Clear(); + hostText.AddText("hosted by "); + hostText.AddLink(v.Username, null, LinkAction.OpenUserProfile, v.Id.ToString(), "Open profile", s => s.Font = "Exo2.0-BoldItalic"); + flagContainer.Child = new DrawableFlag(v.Country) { RelativeSizeAxes = Axes.Both }; }); @@ -138,7 +135,6 @@ public ParticipantInfo(string rankPrefix = null) private void load(OsuColour colours) { levelRangeContainer.Colour = colours.Gray9; - host.Colour = colours.Blue; } } }