ui/richtext/RichTextStun.cs

A RichTextPanel rule for chat or UI text that matches the word "stun"/"stunned"/"stunning" and applies styling. It sets icon, color, font weight, jitter animation, and a yellow dashed underline.

using Sandbox.UI;

[RichTextPanel( @"\b[Ss]tunn?(ed|ing)?\b" )]
public class RichTextStun : RichTextBase
{
	public override string Icon => "";

	public override Color Color => Color.White;

	public override int? FontWeight => 400;

	public override string AnimationName => "jitter";
	public override float? AnimationDuration => 0.5f;

	public override bool Underline => true;
	public override Color? UnderlineColor => Color.Yellow.WithAlpha( 0.75f );
	public override TextDecorationStyle? UnderlineStyle => TextDecorationStyle.Dashed;
}