ui/richtext/RichTextLoseControl.cs

A RichText panel definition for UI that matches the regex "\b[Ll]ose [Cc]ontrol?\b". It customizes color, animation, animation duration, text stroke width and stroke color for matched rich text segments.

using Sandbox.UI;

[RichTextPanel( @"\b[Ll]ose [Cc]ontrol?\b" )]
public class RichTextLoseControl : RichTextBase
{
	public override Color Color => new Color( 1f, 0.25f, 0.25f );
	public override string AnimationName => "jitter";
	public override float? AnimationDuration => 1.5f;
	
	public override float? TextStrokeWidth => 3f;
	public override Color? TextStrokeColor => new Color( 1f, 0f, 0f, 0.2f );
}