diff --git a/Demos/UiDemo.cs b/Demos/UiDemo.cs index 5087a46..8d5be22 100644 --- a/Demos/UiDemo.cs +++ b/Demos/UiDemo.cs @@ -6,12 +6,12 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MLEM.Extensions; using MLEM.Font; +using MLEM.Formatting; using MLEM.Input; using MLEM.Startup; using MLEM.Textures; using MLEM.Ui; using MLEM.Ui.Elements; -using MLEM.Ui.Format; using MLEM.Ui.Style; namespace Demos { diff --git a/MLEM.Ui/Elements/Paragraph.cs b/MLEM.Ui/Elements/Paragraph.cs index 7dd650a..6a17d7a 100644 --- a/MLEM.Ui/Elements/Paragraph.cs +++ b/MLEM.Ui/Elements/Paragraph.cs @@ -6,8 +6,8 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MLEM.Extensions; using MLEM.Font; +using MLEM.Formatting; using MLEM.Textures; -using MLEM.Ui.Format; using MLEM.Ui.Style; namespace MLEM.Ui.Elements { diff --git a/MLEM.Ui/Format/FormattingCode.cs b/MLEM/Formatting/FormattingCode.cs similarity index 95% rename from MLEM.Ui/Format/FormattingCode.cs rename to MLEM/Formatting/FormattingCode.cs index 9c81066..75f1637 100644 --- a/MLEM.Ui/Format/FormattingCode.cs +++ b/MLEM/Formatting/FormattingCode.cs @@ -1,8 +1,7 @@ -using System; using Microsoft.Xna.Framework; using MLEM.Textures; -namespace MLEM.Ui.Format { +namespace MLEM.Formatting { public class FormattingCode { public readonly Type CodeType; diff --git a/MLEM.Ui/Format/TextFormatting.cs b/MLEM/Formatting/TextFormatting.cs similarity index 94% rename from MLEM.Ui/Format/TextFormatting.cs rename to MLEM/Formatting/TextFormatting.cs index 5ecd40d..3deb7a5 100644 --- a/MLEM.Ui/Format/TextFormatting.cs +++ b/MLEM/Formatting/TextFormatting.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using System.Text.RegularExpressions; using Microsoft.Xna.Framework; @@ -7,13 +6,17 @@ using MLEM.Extensions; using MLEM.Font; using MLEM.Textures; -namespace MLEM.Ui.Format { +namespace MLEM.Formatting { public static class TextFormatting { public static readonly Dictionary FormattingCodes = new Dictionary(); - public static string OneEmString = " "; private static Regex formatRegex; + // Unicode suggests that a space should be 1/4em in length, so this string should be + // 1em in length for most fonts. If it's not for the used font, the user can just + // change the value of this string to something that is in fact 1em long + public static string OneEmString = " "; + static TextFormatting() { SetFormatIndicators('[', ']');