/// <summary> /// Creates a new content display instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="displayArea">The content display area.</param> /// <param name="horizontalAlignment">The horizontal content alignment.</param> /// <param name="color">The content color.</param> /// <param name="outlineColor">The content outline color.</param> /// <param name="outlineWidth">The content outline width.</param> public TextControl(SpriteFont font, Rectangle displayArea, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor, int outlineWidth) { this.font = font; this.color = color; this.outlineColor = outlineColor; this.outlineWidth = outlineWidth; this.horizontalAlignment = horizontalAlignment; this.verticalAlignment = verticalAlignment; this.displayArea = displayArea; this.isVisible = true; }
/// <summary> /// Creates a new content display instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="location">The content display location.</param> /// <param name="horizontalAlignment">The horizontal content alignment.</param> /// <param name="verticalAlignment">The vertical content alignment.</param> /// <param name="color">The content color.</param> /// <param name="outlineColor">The content outline color.</param> /// <param name="outlineWidth">The content outline width.</param> public TextControl(SpriteFont font, Vector2 location, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor, int outlineWidth) : this(font, new Rectangle((int)location.X, (int)location.Y, 0, 0), horizontalAlignment, verticalAlignment, color, outlineColor, outlineWidth) { }
/// <summary> /// Creates a new number instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="number">The display number.</param> /// <param name="location">The number display location.</param> /// <param name="horizontalAlignment">The horizontal number alignment.</param> /// <param name="verticalAlignment">The vertical number alignment.</param> /// <param name="color">The number color.</param> /// <param name="outlineColor">The number outline color.</param> /// <param name="outlineWidth">The number outline width.</param> public Number(SpriteFont font, int number, Vector2 location, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor, int outlineWidth) : base(font, location, horizontalAlignment, verticalAlignment, color, outlineColor, outlineWidth) { DisplayNumber = number; }
/// <summary> /// Creates a new number instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="number">The display number.</param> /// <param name="displayArea">The number display area</param> /// <param name="horizontalAlignment">The horizontal number alignment.</param> /// <param name="verticalAlignment">The vertical number alignment.</param> /// <param name="color">The number color.</param> /// <param name="outlineColor">The number outline color.</param> public Number(SpriteFont font, int number, Rectangle displayArea, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor) : this(font, number, displayArea, horizontalAlignment, verticalAlignment, color, outlineColor, 1) { }
/// <summary> /// Creates a new number instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="number">The display number.</param> /// <param name="displayArea">The number display area</param> /// <param name="horizontalAlignment">The horizontal number alignment.</param> /// <param name="verticalAlignment">The vertical number alignment.</param> /// <param name="color">The number color.</param> /// <param name="outlineColor">The number outline color.</param> /// <param name="outlineWidth">The number outline width.</param> public Number(SpriteFont font, int number, Rectangle displayArea, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor, int outlineWidth) : base(font, displayArea, horizontalAlignment, verticalAlignment, color, outlineColor, outlineWidth) { DisplayNumber = number; }
/// <summary> /// Creates a new text instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="text">The display text.</param> /// <param name="location">The text display location.</param> /// <param name="horizontalAlignment">The horizontal text alignment.</param> /// <param name="verticalAlignment">The vertical text alignment.</param> /// <param name="color">The text color.</param> /// <param name="outlineColor">The text outline color.</param> public Text(SpriteFont font, string text, Vector2 location, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor) : this(font, text, location, horizontalAlignment, verticalAlignment, color, outlineColor, 1) { }
/// <summary> /// Creates a new text instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="text">The display text.</param> /// <param name="displayArea">The text display area</param> /// <param name="horizontalAlignment">The horizontal text alignment.</param> /// <param name="verticalAlignment">The vertical text alignment.</param> /// <param name="color">The text color.</param> /// <param name="outlineColor">The text outline color.</param> /// <param name="outlineWidth">The text outline width.</param> public Text(SpriteFont font, string text, Rectangle displayArea, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor, int outlineWidth) : base(font, displayArea, horizontalAlignment, verticalAlignment, color, outlineColor, outlineWidth) { DisplayText = text; }
/// <summary> /// Creates a new text instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="text">The display text.</param> /// <param name="displayArea">The text display area</param> /// <param name="horizontalAlignment">The horizontal text alignment.</param> /// <param name="verticalAlignment">The vertical text alignment.</param> /// <param name="color">The text color.</param> /// <param name="outlineColor">The text outline color.</param> public Text(SpriteFont font, string text, Rectangle displayArea, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor) : this(font, text, displayArea, horizontalAlignment, verticalAlignment, color, outlineColor, 1) { }
/// <summary> /// Creates a new text instance. /// </summary> /// <param name="font">The sprite font.</param> /// <param name="text">The display text.</param> /// <param name="location">The text display location.</param> /// <param name="horizontalAlignment">The horizontal text alignment.</param> /// <param name="verticalAlignment">The vertical text alignment.</param> /// <param name="color">The text color.</param> /// <param name="outlineColor">The text outline color.</param> /// <param name="outlineWidth">The text outline width.</param> public Text(SpriteFont font, string text, Vector2 location, HorizontalAligments horizontalAlignment, VerticalAligments verticalAlignment, Color color, Color outlineColor, int outlineWidth) : base(font, location, horizontalAlignment, verticalAlignment, color, outlineColor, outlineWidth) { DisplayText = text; }