A RichText panel class for displaying an "Attack/Reload Speed" stat in the UI. It defines presentation properties like icon, color, font weight/size, underline and a single stat entry for PlayerStat.AttackSpeed formatted as a percentage difference.
[RichTextPanel( @"\b[Aa]ttack/[Rr]eload [Ss]peed\b" )]
public class RichTextAttackReloadSpeed : RichTextBase
{
public override string Icon => "";
public override Color Color => new Color(0.5f, 1f, 0.7f);
public override int? FontWeight => 400;
public override float? FontSize => 12;
public override bool Underline => true;
public override Color? UnderlineColor => new Color( 0.3f, 0.8f, 0.5f, 0.3f );
public override RichTextStatEntry[] Stats => [
new(PlayerStat.AttackSpeed, StatFormat.PercentageDiff)
];
}