1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

made format settings be non-struct-like

This commit is contained in:
Ellpeck 2019-12-26 19:34:42 +01:00
parent 3d0c3cd6d1
commit f3372e93cb
2 changed files with 10 additions and 8 deletions

View file

@ -105,7 +105,7 @@ namespace MLEM.Ui.Elements {
this.RegularFont.SetFromStyle(style.Font);
this.BoldFont.SetFromStyle(style.BoldFont ?? style.Font);
this.ItalicFont.SetFromStyle(style.ItalicFont ?? style.Font);
this.FormatSettings.SetFromStyle(style.FormatSettings ?? Formatting.FormatSettings.Default);
this.FormatSettings.SetFromStyle(style.FormatSettings);
}
public delegate string TextCallback(Paragraph paragraph);

View file

@ -3,13 +3,7 @@ using Microsoft.Xna.Framework;
namespace MLEM.Formatting {
public class FormatSettings {
public static readonly FormatSettings Default = new FormatSettings {
WobbleModifier = 5,
WobbleHeightModifier = 1 / 8F,
TypingSpeed = 20,
DropShadowColor = Color.Black,
DropShadowOffset = new Vector2(2)
};
public static readonly FormatSettings Default = new FormatSettings();
public float WobbleModifier;
public float WobbleHeightModifier;
@ -17,5 +11,13 @@ namespace MLEM.Formatting {
public Color DropShadowColor;
public Vector2 DropShadowOffset;
public FormatSettings() {
this.WobbleModifier = 5;
this.WobbleHeightModifier = 1 / 8F;
this.TypingSpeed = 20;
this.DropShadowColor = Color.Black;
this.DropShadowOffset = new Vector2(2);
}
}
}