/// <summary> /// Applies any color settings specified in the actor's standardDialogueUISettings. /// </summary> /// <param name="subtitle">The subtitle containing the source text.</param> /// <returns>The subtitle text adjusted for the actor's color settings.</returns> public string AdjustSubtitleColor(Subtitle subtitle) { var text = subtitle.formattedText.text; return(!standardDialogueUISettings.setSubtitleColor ? text : (standardDialogueUISettings.applyColorToPrependedName ? UITools.WrapTextInColor(subtitle.speakerInfo.Name + standardDialogueUISettings.prependActorNameSeparator, standardDialogueUISettings.subtitleColor) + text : UITools.WrapTextInColor(text, standardDialogueUISettings.subtitleColor))); }
private string ProcessText(Subtitle subtitle) { switch (applyTo) { default: case ApplyTo.DialogueText: return(UITools.WrapTextInColor(subtitle.formattedText.text, color)); case ApplyTo.PrependedActorName: return(UITools.WrapTextInColor(subtitle.speakerInfo.Name + prependActorNameSeparator, color) + subtitle.formattedText.text); } }