From fd5b83eaa0c9ec8824d38e632d96dbd74c9ff7e4 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 10 Oct 2021 20:30:40 +0200 Subject: [PATCH] added a strikethrough formatting code --- CHANGELOG.md | 4 ++++ MLEM/Formatting/TextFormatter.cs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f571f8..9e18831 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ Jump to version: - [5.0.0](#500) ## 5.2.0 (Unreleased) +### MLEM +Additions +- Added a strikethrough formatting code + ### MLEM.Ui Improvements - Cache TokenizedString inner offsets for non-Left text alignments to improve performance diff --git a/MLEM/Formatting/TextFormatter.cs b/MLEM/Formatting/TextFormatter.cs index 6248ef0..f7584c7 100644 --- a/MLEM/Formatting/TextFormatter.cs +++ b/MLEM/Formatting/TextFormatter.cs @@ -38,7 +38,8 @@ namespace MLEM.Formatting { m.Groups[1].Success ? ColorHelper.FromHexString(m.Groups[1].Value) : Color.Black, new Vector2(float.TryParse(m.Groups[2].Value, NumberStyles.Number, CultureInfo.InvariantCulture, out var offset) ? offset : 2))); this.Codes.Add(new Regex(""), (f, m, r) => new UnderlineCode(m, r, 1 / 16F, 0.85F)); - this.Codes.Add(new Regex(""), (f, m, r) => new ResetFormattingCode(m, r)); + this.Codes.Add(new Regex(""), (f, m, r) => new UnderlineCode(m, r, 1 / 16F, 0.55F)); + this.Codes.Add(new Regex(""), (f, m, r) => new ResetFormattingCode(m, r)); this.Codes.Add(new Regex(""), (f, m, r) => new FontCode(m, r, null)); // color codes