Example #1
0
        protected override void InternalDraw(SpriteBatch spriteBatch)
        {
            var show = Selected && DateTime.Now.Millisecond % 1000 < 500;

            _nineSlice.DrawRectangle(spriteBatch, Bounds, 3f);

            if (Selected)
            {
                ShapeHelpers.DrawRectangle(spriteBatch, Bounds, Color.Green);
            }

            var tempText = show ? Value.Insert(Value.Length, "|") : Value;

            spriteBatch.DrawString(_font, tempText,
                                   new Vector2(Bounds.Left + 10, Bounds.Center.Y - _font.MeasureString(tempText).Y / 2f), Color.Black);
        }
Example #2
0
 public override void DrawDebug(SpriteBatch spriteBatch) =>
 ShapeHelpers.DrawRectangle(spriteBatch, Bounds, Color.Red);
Example #3
0
 public override void DrawDebug(SpriteBatch spriteBatch)
 {
     ShapeHelpers.DrawRectangle(spriteBatch, new Rectangle((int)_position.X, (int)_position.Y, _width, 10),
                                Color.Red);
 }