1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Fix text getting truncated after last link in chat line

This commit is contained in:
Dean Herbert 2018-01-30 17:47:22 +09:00
parent e5188fd151
commit 53129e5235

View File

@ -54,10 +54,11 @@ namespace osu.Game.Graphics.Containers
foreach (var link in links) foreach (var link in links)
{ {
AddText(text.Substring(previousLinkEnd, link.Index - previousLinkEnd)); AddText(text.Substring(previousLinkEnd, link.Index - previousLinkEnd));
AddLink(text.Substring(link.Index, link.Length), link.Url, link.Action, link.Argument); AddLink(text.Substring(link.Index, link.Length), link.Url, link.Action, link.Argument);
previousLinkEnd = link.Index + link.Length; previousLinkEnd = link.Index + link.Length;
} }
AddText(text.Substring(previousLinkEnd));
} }
public void AddLink(string text, string url, LinkAction linkType = LinkAction.External, string linkArgument = null, string tooltipText = null) public void AddLink(string text, string url, LinkAction linkType = LinkAction.External, string linkArgument = null, string tooltipText = null)