Made it so the link ID is always added before loading the SpriteTexts (fixed weird bug where some sprites would be white instead of blue). Also improved XML doc on TextColour

This commit is contained in:
FreezyLemon 2017-12-04 13:46:07 +01:00
parent fd13bacf4a
commit 9b866d2248

View File

@ -35,7 +35,7 @@ namespace osu.Game.Graphics.Containers
protected override SpriteText CreateSpriteText() => new T();
/// <summary>
/// The colour for normal text (links ignore this). This should be set before text is added.
/// The colour for normal text (links ignore this). Will only be used for new text elements.
/// <para>Default is white.</para>
/// </summary>
public ColourInfo? TextColour;
@ -44,8 +44,8 @@ namespace osu.Game.Graphics.Containers
{
AddText(text, link =>
{
LoadComponentAsync(link, d => ((T)d).Url = url);
creationParameters?.Invoke(link);
LoadComponentAsync(link, d => ((T)d).Url = url);
});
}