No, it's easy to address.
If you want it to change the entire previous text to gray, even bits text that had their own color, change the script to:
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
using System.Text.RegularExpressions;
public class GrayPreviousTextSubtitlePanel : StandardUISubtitlePanel
{
protected const string grayOpenTag = "<color=#c0c0c0>";
protected const string grayCloseTag = "</color>";
public override void SetContent(Subtitle subtitle)
{
// Remove all color tags from previous text and then wrap in gray color:
const string pattern = @"<color=\w+>|<color=[#][\w|\d]+>|</color>";
Debug.Log(accumulatedText + " ==> " + Regex.Replace(accumulatedText, pattern, string.Empty));
accumulatedText = grayOpenTag + Regex.Replace(accumulatedText, pattern, string.Empty) + grayCloseTag;
base.SetContent(subtitle);
}
}
(The script's actually a little shorter this way.)
If you need to retain the color in the bits that have their own color, you can modify the script to use UITools.WrapTextInColor(), which properly wraps <color> tags around text while still being aware of other <color> tags.