1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-25 22:18:34 +01:00

moved formatting to MLEM proper

This commit is contained in:
Ellpeck 2019-09-06 12:20:53 +02:00
parent e2f9a8ff5d
commit a46e8fce86
4 changed files with 9 additions and 7 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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;

View file

@ -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<string, FormattingCode> FormattingCodes = new Dictionary<string, FormattingCode>();
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('[', ']');