public TextObject( Vector2 scale, Color color, float alpha = 1f, TextConfig textConfig = null) { if (textConfig == null) textConfig = TextConfig.Default; textRaw = new Fast2D.TextObject { FontTexture = textConfig.FontTexture.Clone(), FontBaseColor = textConfig.FontBaseColor, StaticColor = textConfig.StaticColor, Alpha = (int) (alpha*255), SpaceWidth = textConfig.SpaceWidth, SpaceHeight = textConfig.SpaceHeight }; if (textConfig.Padding != float.MinValue) textRaw.Padding = textConfig.Padding; else textRaw.PaddingFunc = textConfig.PaddingFunc; // ff workaround... to remove b4 gamejam //if (color == Color.White) // color = Color.FromArgb(238, 242, 238); textRaw.CharToSprite = textConfig.CharToSprite; Scale = scale; Color = color; IgnoreCamera = true; }
public TextObject( float uniformScale, Color color, float alpha = 1f, TextConfig textConfig = null) : this(new Vector2(uniformScale, uniformScale), color, alpha, textConfig) { }