示例#1
0
        protected override void InternalDraw(SpriteBatch spriteBatch)
        {
            _nineSlice.DrawRectangle(spriteBatch, Bounds, _scale);

            if (SanctuaryGame.Debug)
            {
                DrawDebug(spriteBatch);
            }
        }
示例#2
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);
        }