コード例 #1
0
        /// <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;
        }
コード例 #2
0
 /// <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)
 {
 }
コード例 #3
0
 /// <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;
 }
コード例 #4
0
 /// <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)
 {
 }
コード例 #5
0
 /// <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;
 }
コード例 #6
0
 /// <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)
 {
 }
コード例 #7
0
 /// <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;
 }
コード例 #8
0
 /// <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)
 {
 }
コード例 #9
0
 /// <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;
 }